@feedmepos/mf-hrm-portal 2.3.0-dev.13 → 2.3.0-dev.14
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/{ApprovalCodeList-D3egZFML.js → ApprovalCodeList-C9dauQ81.js} +4 -4
- package/dist/{AuditLogList-BzbaEsSj.js → AuditLogList-zW_N_ECT.js} +17 -18
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Do52KbKm.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js} +2 -2
- package/dist/{EmployeeList-BiM8dRwZ.js → EmployeeList-8jkHTd7q.js} +255 -267
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-CJc_g0tW.js} +6 -6
- package/dist/{GrantUserList-Dj2ms20E.js → GrantUserList-Dj55GA7O.js} +5 -5
- package/dist/{Main-C2z7Jf9A.js → Main-0TfvGJ4N.js} +5 -5
- package/dist/{Main-DmpwTPaI.js → Main-BQNkTyET.js} +9 -9
- package/dist/{Main-DklZWoKj.js → Main-CuUG6svQ.js} +2 -2
- package/dist/{PermissionSetList-C-qgCcRO.js → PermissionSetList-BsLi-TOK.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ggZB5zWW.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C2l8nWx2.js} +1014 -1014
- package/dist/{RoleList-ohfin77B.js → RoleList-DLDcyVWT.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-diuWysro.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CUXUPfRc.js} +190 -181
- package/dist/{ScheduleGeneralPage-aCljFf21.js → ScheduleGeneralPage-BhYI6O9g.js} +132 -133
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-x_-BYkcc.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js} +669 -646
- package/dist/{SchedulePage-DdMHF6kX.js → SchedulePage-DPU4taJt.js} +7407 -7359
- package/dist/{SchedulePositionPage-CID91orD.js → SchedulePositionPage-Byt6nmUj.js} +82 -84
- package/dist/{SelectFilter-CG13h83-.js → SelectFilter-1fh00OZW.js} +1 -1
- package/dist/{TeamMemberList-DJIKL4dE.js → TeamMemberList-CyUX8Afk.js} +35 -36
- package/dist/{TimesheetList-BPXWPNfT.js → TimesheetList-Q4FeNgOT.js} +52 -53
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DVcV0knM.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C3iU4Zmc.js} +2 -2
- package/dist/{app-Bz8568j8.js → app-TuHQoM7K.js} +676 -666
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DhSRKSu4.js → dayjs.min-DXnA8GYn.js} +1 -1
- package/dist/{employee-BM44u8b-.js → employee-Ctnil3cD.js} +3 -3
- package/dist/{iteration-BHDxs89d.js → iteration-BxOzv27y.js} +1 -1
- package/dist/{lodash-DgSYLwYD.js → lodash-CKT_RxJs.js} +1 -1
- package/dist/object-Dwyg2LgX.js +16 -0
- package/dist/{role-BMJ7LEHN.js → role-CNEJPyaD.js} +1 -1
- package/dist/{rule-CCo7_ckA.js → rule-FbuHv6Gh.js} +2 -2
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +3 -1
- package/dist/src/views/scheduling/data.d.ts +17 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-C_Cd__n1.js → useReportPermissions-lemBrd1S.js} +3 -3
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as y, defineComponent as Pe, ref as V, watch as le, onMounted as Me, resolveComponent as F, createBlock as M, openBlock as v, unref as o, withCtx as g, createElementVNode as u, createVNode as c, createElementBlock as R, Fragment as P, createCommentVNode as _e, renderList as ne, normalizeClass as Ue, toDisplayString as $, h as A, createTextVNode as ge, resolveDynamicComponent as Ee, withModifiers as Ze, nextTick as De } from "vue";
|
|
2
|
-
import { e as D } from "./iteration-
|
|
2
|
+
import { e as D } from "./iteration-BxOzv27y.js";
|
|
3
3
|
import { useI18n as Te } from "@feedmepos/mf-common";
|
|
4
4
|
import { useBreakpoints as Be, useSnackbar as je, components as ye, useDialog as es, FmButtonColorThemeVariant as ss } from "@feedmepos/ui-library";
|
|
5
|
-
import { D as ts, k as as, A as ls, S as os, _ as rs } from "./app-
|
|
5
|
+
import { D as ts, k as as, A as ls, S as os, _ as rs } from "./app-TuHQoM7K.js";
|
|
6
6
|
import { _ as $e } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
7
|
import { _ as ns } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
8
|
-
import { r as ie, h as Ae, f as is, s as us, g as Ie, e as cs, a as oe } from "./rule-
|
|
8
|
+
import { r as ie, h as Ae, f as is, s as us, g as Ie, e as cs, a as oe } from "./rule-FbuHv6Gh.js";
|
|
9
9
|
import { u as xe } from "./restaurant-BbYRA_IT.js";
|
|
10
|
-
import { u as Oe } from "./role-
|
|
11
|
-
import { u as Ne } from "./useReportPermissions-
|
|
12
|
-
import { l as re } from "./lodash-
|
|
13
|
-
import { u as ms, _ as ds, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { u as Oe } from "./role-CNEJPyaD.js";
|
|
11
|
+
import { u as Ne } from "./useReportPermissions-lemBrd1S.js";
|
|
12
|
+
import { l as re } from "./lodash-CKT_RxJs.js";
|
|
13
|
+
import { u as ms, _ as ds, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js";
|
|
14
14
|
import { _ as be } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
15
15
|
import { u as ps } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
16
16
|
import { u as fs } from "./useLoading-Ch1AUYT1.js";
|
|
@@ -1,78 +1,87 @@
|
|
|
1
|
-
import { ref as h, watch as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as h, watch as ne, computed as S, reactive as Ie, nextTick as be, defineComponent as Pe, createBlock as Q, openBlock as b, withCtx as C, createElementVNode as n, createVNode as R, toDisplayString as f, unref as q, createElementBlock as N, withDirectives as se, withKeys as we, vModelText as oe, normalizeClass as ie, createTextVNode as M, createCommentVNode as G, Fragment as de, renderList as Ne } from "vue";
|
|
2
|
+
import { at as X, f as z, aw as $e, ax as me, ay as pe, az as Ce, G as W, p as H, as as Se, aq as O } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js";
|
|
3
3
|
import { useI18n as Ae } from "@feedmepos/mf-common";
|
|
4
|
-
function
|
|
4
|
+
function ue() {
|
|
5
5
|
return X.map((e) => ({ id: e.id, name: e.name }));
|
|
6
6
|
}
|
|
7
7
|
function la(e = {}) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
() => X.map((
|
|
8
|
+
const s = h(ue());
|
|
9
|
+
ne(
|
|
10
|
+
() => X.map((o) => `${o.id}:${o.name}`).join(" "),
|
|
11
11
|
() => {
|
|
12
|
-
|
|
12
|
+
s.value = ue();
|
|
13
|
+
}
|
|
14
|
+
), ne(
|
|
15
|
+
() => {
|
|
16
|
+
var o;
|
|
17
|
+
return (((o = z.value) == null ? void 0 : o.positions) ?? []).map((m) => `${m.id}:${m.name}`).join(" ");
|
|
18
|
+
},
|
|
19
|
+
() => {
|
|
20
|
+
var o;
|
|
21
|
+
s.value = (((o = z.value) == null ? void 0 : o.positions) ?? []).map((m) => ({ id: m.id, name: m.name }));
|
|
13
22
|
}
|
|
14
23
|
);
|
|
15
|
-
const g = h(!1), a = h(""), t = h(null),
|
|
16
|
-
function A(
|
|
17
|
-
var
|
|
18
|
-
return (((
|
|
19
|
-
(
|
|
20
|
-
var
|
|
21
|
-
return ((
|
|
24
|
+
const g = h(!1), a = h(""), t = h(null), c = h(!1), k = h(null);
|
|
25
|
+
function A(o) {
|
|
26
|
+
var m;
|
|
27
|
+
return (((m = z.value) == null ? void 0 : m.employees) ?? []).filter(
|
|
28
|
+
(P) => {
|
|
29
|
+
var I;
|
|
30
|
+
return ((I = P.primaryPosition) == null ? void 0 : I.positionId) === o || P.secondaryPositions.some((V) => V.positionId === o);
|
|
22
31
|
}
|
|
23
32
|
).length;
|
|
24
33
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
34
|
+
function j(o) {
|
|
35
|
+
return s.value.some((m) => m.name.toLowerCase() === o.toLowerCase());
|
|
27
36
|
}
|
|
28
|
-
function
|
|
37
|
+
function F() {
|
|
29
38
|
g.value = !0, a.value = "", t.value = null, k.value = null;
|
|
30
39
|
}
|
|
31
40
|
function $() {
|
|
32
41
|
g.value = !1, a.value = "";
|
|
33
42
|
}
|
|
34
43
|
async function D() {
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
if (!(!
|
|
38
|
-
|
|
44
|
+
var m, P;
|
|
45
|
+
const o = a.value.trim().slice(0, 40);
|
|
46
|
+
if (!(!o || j(o))) {
|
|
47
|
+
c.value = !0, k.value = null;
|
|
39
48
|
try {
|
|
40
|
-
await
|
|
41
|
-
} catch (
|
|
42
|
-
k.value =
|
|
49
|
+
await me({ name: o }), g.value = !1, a.value = "", (m = e.notify) == null || m.call(e, "Position added", "success");
|
|
50
|
+
} catch (I) {
|
|
51
|
+
k.value = I instanceof Error ? I.message : "Could not add this position", (P = e.notify) == null || P.call(e, k.value, "error");
|
|
43
52
|
} finally {
|
|
44
|
-
|
|
53
|
+
c.value = !1;
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
|
-
function E(
|
|
49
|
-
t.value =
|
|
57
|
+
function E(o) {
|
|
58
|
+
t.value = o;
|
|
50
59
|
}
|
|
51
60
|
function p() {
|
|
52
61
|
t.value = null;
|
|
53
62
|
}
|
|
54
|
-
async function L(
|
|
55
|
-
var
|
|
56
|
-
|
|
63
|
+
async function L(o) {
|
|
64
|
+
var m, P;
|
|
65
|
+
c.value = !0, k.value = null;
|
|
57
66
|
try {
|
|
58
|
-
await $e(
|
|
59
|
-
} catch (
|
|
60
|
-
k.value =
|
|
67
|
+
await $e(o), s.value = s.value.filter((I) => I.id !== o), t.value = null, (m = e.notify) == null || m.call(e, "Position removed", "success");
|
|
68
|
+
} catch (I) {
|
|
69
|
+
k.value = I instanceof Error ? I.message : "Could not delete this position", (P = e.notify) == null || P.call(e, k.value, "error");
|
|
61
70
|
} finally {
|
|
62
|
-
|
|
71
|
+
c.value = !1;
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
|
-
const J = S(() =>
|
|
74
|
+
const J = S(() => s.value.length);
|
|
66
75
|
return {
|
|
67
|
-
positions:
|
|
76
|
+
positions: s,
|
|
68
77
|
count: J,
|
|
69
78
|
isAdding: g,
|
|
70
79
|
newName: a,
|
|
71
80
|
pendingDeleteId: t,
|
|
72
|
-
saving:
|
|
81
|
+
saving: c,
|
|
73
82
|
error: k,
|
|
74
83
|
usageCountFor: A,
|
|
75
|
-
startAdd:
|
|
84
|
+
startAdd: F,
|
|
76
85
|
cancelAdd: $,
|
|
77
86
|
confirmAdd: D,
|
|
78
87
|
askDelete: E,
|
|
@@ -82,188 +91,188 @@ function la(e = {}) {
|
|
|
82
91
|
}
|
|
83
92
|
function Ee(e) {
|
|
84
93
|
var g;
|
|
85
|
-
const
|
|
86
|
-
return
|
|
94
|
+
const s = e.trim().split(/\s+/).filter(Boolean);
|
|
95
|
+
return s.length ? (s[0][0] + (((g = s[1]) == null ? void 0 : g[0]) ?? "")).toUpperCase() : "??";
|
|
87
96
|
}
|
|
88
|
-
function ta(e,
|
|
89
|
-
const g = h(!1), a = h(""), t = h(""),
|
|
97
|
+
function ta(e, s = {}) {
|
|
98
|
+
const g = h(!1), a = h(""), t = h(""), c = Ie({}), k = h(!1), A = h(null), j = h(null), F = h(!1), $ = h(null);
|
|
90
99
|
let D = "", E = /* @__PURE__ */ new Set();
|
|
91
100
|
const p = S(() => {
|
|
92
|
-
var
|
|
93
|
-
const l = new Map((((
|
|
94
|
-
return pe.value.map((
|
|
95
|
-
var T,
|
|
96
|
-
const
|
|
97
|
-
(T =
|
|
98
|
-
...((
|
|
99
|
-
].filter((
|
|
100
|
-
(
|
|
101
|
-
...((
|
|
102
|
-
].filter((
|
|
101
|
+
var r;
|
|
102
|
+
const l = new Map((((r = z.value) == null ? void 0 : r.employees) ?? []).map((y) => [y.employeeId, y]));
|
|
103
|
+
return pe.value.map((y) => {
|
|
104
|
+
var T, v;
|
|
105
|
+
const i = l.get(y._id), x = [
|
|
106
|
+
(T = i == null ? void 0 : i.primaryPosition) == null ? void 0 : T.positionName,
|
|
107
|
+
...((i == null ? void 0 : i.secondaryPositions) ?? []).map((u) => u.positionName)
|
|
108
|
+
].filter((u) => !!u), d = [
|
|
109
|
+
(v = i == null ? void 0 : i.primaryPosition) == null ? void 0 : v.positionId,
|
|
110
|
+
...((i == null ? void 0 : i.secondaryPositions) ?? []).map((u) => u.positionId)
|
|
111
|
+
].filter((u) => !!u);
|
|
103
112
|
return {
|
|
104
|
-
employeeId:
|
|
105
|
-
name:
|
|
106
|
-
initials: Ee(
|
|
113
|
+
employeeId: y._id,
|
|
114
|
+
name: y.name,
|
|
115
|
+
initials: Ee(y.name),
|
|
107
116
|
held: x,
|
|
108
|
-
heldPositionIds:
|
|
117
|
+
heldPositionIds: d
|
|
109
118
|
};
|
|
110
119
|
});
|
|
111
120
|
}), L = S(() => {
|
|
112
121
|
const l = t.value.trim().toLowerCase();
|
|
113
|
-
return p.value.filter((
|
|
122
|
+
return p.value.filter((r) => !l || r.name.toLowerCase().includes(l));
|
|
114
123
|
}), J = S(
|
|
115
|
-
() => p.value.filter((l) =>
|
|
116
|
-
),
|
|
117
|
-
() => L.value.length > 0 && L.value.every((l) =>
|
|
118
|
-
),
|
|
119
|
-
() => !!
|
|
120
|
-
(l) => l.id !== $.value && l.name.toLowerCase() ===
|
|
124
|
+
() => p.value.filter((l) => c[l.employeeId]).map((l) => l.employeeId)
|
|
125
|
+
), o = S(
|
|
126
|
+
() => L.value.length > 0 && L.value.every((l) => c[l.employeeId])
|
|
127
|
+
), m = S(() => a.value.trim().slice(0, 40)), P = S(
|
|
128
|
+
() => !!m.value && X.some(
|
|
129
|
+
(l) => l.id !== $.value && l.name.toLowerCase() === m.value.toLowerCase()
|
|
121
130
|
)
|
|
122
|
-
),
|
|
123
|
-
function
|
|
124
|
-
a.value = "", t.value = "", Object.keys(
|
|
131
|
+
), I = S(() => !!m.value && !P.value && !k.value);
|
|
132
|
+
function V() {
|
|
133
|
+
a.value = "", t.value = "", Object.keys(c).forEach((l) => delete c[l]), A.value = null, F.value = !1, j.value = null, $.value = null, D = "", E = /* @__PURE__ */ new Set();
|
|
125
134
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
135
|
+
function ce() {
|
|
136
|
+
V(), g.value = !0;
|
|
128
137
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
p.value.filter((
|
|
132
|
-
), E.forEach((
|
|
138
|
+
function re(l, r) {
|
|
139
|
+
V(), $.value = l, a.value = r, D = r, E = new Set(
|
|
140
|
+
p.value.filter((y) => y.heldPositionIds.includes(l)).map((y) => y.employeeId)
|
|
141
|
+
), E.forEach((y) => c[y] = !0), g.value = !0;
|
|
133
142
|
}
|
|
134
|
-
function
|
|
135
|
-
g.value = !1,
|
|
143
|
+
function ve() {
|
|
144
|
+
g.value = !1, V();
|
|
136
145
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
146
|
+
function ye(l) {
|
|
147
|
+
c[l] = !c[l];
|
|
139
148
|
}
|
|
140
|
-
function
|
|
141
|
-
if (
|
|
142
|
-
Object.keys(
|
|
149
|
+
function fe() {
|
|
150
|
+
if (o.value) {
|
|
151
|
+
Object.keys(c).forEach((l) => delete c[l]);
|
|
143
152
|
return;
|
|
144
153
|
}
|
|
145
|
-
L.value.forEach((l) =>
|
|
154
|
+
L.value.forEach((l) => c[l.employeeId] = !0);
|
|
146
155
|
}
|
|
147
|
-
function Y(l,
|
|
148
|
-
const
|
|
149
|
-
positionId:
|
|
150
|
-
positionName:
|
|
151
|
-
})), x =
|
|
156
|
+
function Y(l, r) {
|
|
157
|
+
const y = !!(l != null && l.primaryPosition), i = ((l == null ? void 0 : l.secondaryPositions) ?? []).map((d) => ({
|
|
158
|
+
positionId: d.positionId,
|
|
159
|
+
positionName: d.positionName
|
|
160
|
+
})), x = y ? [...i, { positionName: r }] : i;
|
|
152
161
|
return {
|
|
153
|
-
...
|
|
154
|
-
secondaryPositions: x.map((
|
|
162
|
+
...y ? {} : { primaryPosition: H(r) },
|
|
163
|
+
secondaryPositions: x.map((d) => H(d.positionName, d.positionId)).filter((d) => !!d)
|
|
155
164
|
};
|
|
156
165
|
}
|
|
157
|
-
async function
|
|
166
|
+
async function he() {
|
|
158
167
|
var x;
|
|
159
|
-
const l =
|
|
160
|
-
await
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
const T = (
|
|
165
|
-
return W(
|
|
166
|
-
employeeName:
|
|
168
|
+
const l = m.value;
|
|
169
|
+
await me({ name: l }), await be(), e == null || e(l);
|
|
170
|
+
const r = p.value.filter((d) => c[d.employeeId]), i = (await Promise.allSettled(
|
|
171
|
+
r.map((d) => {
|
|
172
|
+
var v;
|
|
173
|
+
const T = (v = z.value) == null ? void 0 : v.employees.find((u) => u.employeeId === d.employeeId);
|
|
174
|
+
return W(d.employeeId, {
|
|
175
|
+
employeeName: d.name,
|
|
167
176
|
...Y(T, l)
|
|
168
177
|
});
|
|
169
178
|
})
|
|
170
|
-
)).filter((
|
|
171
|
-
return
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
)).filter((d) => d.status === "rejected").length;
|
|
180
|
+
return j.value = { name: l, assigned: r.length - i, failed: i }, (x = s.notify) == null || x.call(
|
|
181
|
+
s,
|
|
182
|
+
i ? `Position added, but ${i} employee assignment${i === 1 ? "" : "s"} failed` : "Position added",
|
|
183
|
+
i ? "error" : "success"
|
|
175
184
|
), !0;
|
|
176
185
|
}
|
|
177
|
-
async function
|
|
186
|
+
async function ge(l) {
|
|
178
187
|
var T;
|
|
179
|
-
const
|
|
180
|
-
await Ce(l, { name:
|
|
181
|
-
const
|
|
182
|
-
(
|
|
183
|
-
),
|
|
184
|
-
(
|
|
185
|
-
),
|
|
186
|
-
...
|
|
187
|
-
var
|
|
188
|
-
const
|
|
189
|
-
return W(
|
|
190
|
-
employeeName:
|
|
191
|
-
...Y(
|
|
188
|
+
const r = m.value;
|
|
189
|
+
await Ce(l, { name: r }), e == null || e(r);
|
|
190
|
+
const y = p.value.filter(
|
|
191
|
+
(v) => c[v.employeeId] && !E.has(v.employeeId)
|
|
192
|
+
), i = p.value.filter(
|
|
193
|
+
(v) => !c[v.employeeId] && E.has(v.employeeId)
|
|
194
|
+
), d = (await Promise.allSettled([
|
|
195
|
+
...y.map((v) => {
|
|
196
|
+
var K;
|
|
197
|
+
const u = (K = z.value) == null ? void 0 : K.employees.find((U) => U.employeeId === v.employeeId);
|
|
198
|
+
return W(v.employeeId, {
|
|
199
|
+
employeeName: v.name,
|
|
200
|
+
...Y(u, r)
|
|
192
201
|
});
|
|
193
202
|
}),
|
|
194
|
-
...
|
|
203
|
+
...i.map((v) => {
|
|
195
204
|
var ee, ae, le, te;
|
|
196
|
-
const
|
|
205
|
+
const u = (ee = z.value) == null ? void 0 : ee.employees.find((w) => w.employeeId === v.employeeId), K = ((u == null ? void 0 : u.secondaryPositions) ?? []).filter(
|
|
197
206
|
(w) => w.positionId !== l && (w.positionId || w.positionName !== D)
|
|
198
|
-
), U = ((ae =
|
|
199
|
-
return W(
|
|
200
|
-
employeeName:
|
|
207
|
+
), U = ((ae = u == null ? void 0 : u.primaryPosition) == null ? void 0 : ae.positionId) === l || !((le = u == null ? void 0 : u.primaryPosition) != null && le.positionId) && ((te = u == null ? void 0 : u.primaryPosition) == null ? void 0 : te.positionName) === D, B = U ? K.shift() : void 0;
|
|
208
|
+
return W(v.employeeId, {
|
|
209
|
+
employeeName: v.name,
|
|
201
210
|
...U ? {
|
|
202
|
-
primaryPosition: H(
|
|
211
|
+
primaryPosition: H(B == null ? void 0 : B.positionName, B == null ? void 0 : B.positionId) ?? null
|
|
203
212
|
} : {},
|
|
204
|
-
secondaryPositions:
|
|
213
|
+
secondaryPositions: K.map((w) => H(w.positionName, w.positionId)).filter((w) => !!w)
|
|
205
214
|
});
|
|
206
215
|
})
|
|
207
|
-
])).filter((
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
216
|
+
])).filter((v) => v.status === "rejected").length;
|
|
217
|
+
return j.value = { name: r, assigned: Math.max(0, y.length - d), failed: d }, (T = s.notify) == null || T.call(
|
|
218
|
+
s,
|
|
219
|
+
d ? `Position updated, but ${d} employee assignment${d === 1 ? "" : "s"} failed` : "Position updated",
|
|
220
|
+
d ? "error" : "success"
|
|
212
221
|
), !0;
|
|
213
222
|
}
|
|
214
223
|
async function Z() {
|
|
215
224
|
var l;
|
|
216
|
-
if (!
|
|
217
|
-
return
|
|
218
|
-
if (!
|
|
225
|
+
if (!m.value)
|
|
226
|
+
return F.value = !0, !1;
|
|
227
|
+
if (!I.value) return !1;
|
|
219
228
|
k.value = !0, A.value = null;
|
|
220
229
|
try {
|
|
221
|
-
return await ($.value ?
|
|
222
|
-
} catch (
|
|
223
|
-
return A.value =
|
|
230
|
+
return await ($.value ? ge($.value) : he());
|
|
231
|
+
} catch (r) {
|
|
232
|
+
return A.value = r instanceof Error ? r.message : `Could not ${$.value ? "save" : "add"} this position`, (l = s.notify) == null || l.call(s, A.value, "error"), !1;
|
|
224
233
|
} finally {
|
|
225
234
|
k.value = !1;
|
|
226
235
|
}
|
|
227
236
|
}
|
|
228
237
|
function _() {
|
|
229
|
-
|
|
238
|
+
V();
|
|
230
239
|
}
|
|
231
|
-
async function
|
|
240
|
+
async function ke() {
|
|
232
241
|
await Z() && _();
|
|
233
242
|
}
|
|
234
243
|
return {
|
|
235
244
|
open: g,
|
|
236
245
|
name: a,
|
|
237
246
|
search: t,
|
|
238
|
-
picks:
|
|
247
|
+
picks: c,
|
|
239
248
|
saving: k,
|
|
240
249
|
error: A,
|
|
241
|
-
done:
|
|
242
|
-
nameError:
|
|
250
|
+
done: j,
|
|
251
|
+
nameError: F,
|
|
243
252
|
people: p,
|
|
244
253
|
visible: L,
|
|
245
254
|
pickedIds: J,
|
|
246
|
-
allPicked:
|
|
247
|
-
nameTaken:
|
|
248
|
-
canSave:
|
|
255
|
+
allPicked: o,
|
|
256
|
+
nameTaken: P,
|
|
257
|
+
canSave: I,
|
|
249
258
|
editingId: $,
|
|
250
|
-
openNew:
|
|
251
|
-
openEdit:
|
|
252
|
-
close:
|
|
253
|
-
toggle:
|
|
254
|
-
toggleAll:
|
|
259
|
+
openNew: ce,
|
|
260
|
+
openEdit: re,
|
|
261
|
+
close: ve,
|
|
262
|
+
toggle: ye,
|
|
263
|
+
toggleAll: fe,
|
|
255
264
|
save: Z,
|
|
256
|
-
saveAndAnother:
|
|
265
|
+
saveAndAnother: ke,
|
|
257
266
|
another: _
|
|
258
267
|
};
|
|
259
268
|
}
|
|
260
269
|
const xe = { class: "am-head" }, Te = {
|
|
261
270
|
id: "schedule-position-title",
|
|
262
271
|
class: "am-title"
|
|
263
|
-
}, Me = { class: "ce-body" }, Oe = { key: 0 }, ze = { class: "ce-field" },
|
|
272
|
+
}, Me = { class: "ce-body" }, Oe = { key: 0 }, ze = { class: "ce-field" }, je = {
|
|
264
273
|
class: "ce-field asg-field",
|
|
265
274
|
style: { "margin-bottom": "0" }
|
|
266
|
-
},
|
|
275
|
+
}, De = { class: "asg-head" }, Le = { class: "asg-count" }, Ve = { class: "asg-list" }, Be = ["checked", "onChange"], Fe = { class: "asg-av" }, Ke = { class: "asg-id" }, Re = { class: "asg-nm" }, Ue = { class: "asg-sub" }, qe = { key: 1 }, Ge = {
|
|
267
276
|
key: 0,
|
|
268
277
|
class: "asg-sub",
|
|
269
278
|
style: { padding: "10px" }
|
|
@@ -282,8 +291,8 @@ const xe = { class: "am-head" }, Te = {
|
|
|
282
291
|
modal: {}
|
|
283
292
|
},
|
|
284
293
|
setup(e) {
|
|
285
|
-
const { t:
|
|
286
|
-
return (g, a) => (
|
|
294
|
+
const { t: s } = Ae();
|
|
295
|
+
return (g, a) => (b(), Q(Se, {
|
|
287
296
|
open: e.modal.open.value,
|
|
288
297
|
"panel-class": "ce-modal",
|
|
289
298
|
"panel-style": "width: min(480px, 95vw)",
|
|
@@ -292,8 +301,8 @@ const xe = { class: "am-head" }, Te = {
|
|
|
292
301
|
}, {
|
|
293
302
|
default: C(() => [
|
|
294
303
|
n("div", xe, [
|
|
295
|
-
n("div", Te, f(e.modal.editingId.value ? q(
|
|
296
|
-
|
|
304
|
+
n("div", Te, f(e.modal.editingId.value ? q(s)("scheduling.positionModal.editTitle") : q(s)("scheduling.positionModal.addTitle")), 1),
|
|
305
|
+
R(O, {
|
|
297
306
|
hierarchy: "ghost",
|
|
298
307
|
size: "xs",
|
|
299
308
|
"icon-only": "",
|
|
@@ -320,7 +329,7 @@ const xe = { class: "am-head" }, Te = {
|
|
|
320
329
|
})
|
|
321
330
|
]),
|
|
322
331
|
n("div", Me, [
|
|
323
|
-
e.modal.done.value ? (
|
|
332
|
+
e.modal.done.value ? (b(), N("div", He, [
|
|
324
333
|
n("div", Je, [
|
|
325
334
|
a[16] || (a[16] = n("span", {
|
|
326
335
|
class: "cg-done-tick",
|
|
@@ -331,14 +340,14 @@ const xe = { class: "am-head" }, Te = {
|
|
|
331
340
|
n("small", null, f(e.modal.editingId.value ? "Position updated" : e.modal.done.value.assigned ? `Added to ${e.modal.done.value.assigned} ${e.modal.done.value.assigned === 1 ? "employee" : "employees"}` : "Position added"), 1)
|
|
332
341
|
])
|
|
333
342
|
]),
|
|
334
|
-
e.modal.done.value.failed ? (
|
|
335
|
-
])) : (
|
|
343
|
+
e.modal.done.value.failed ? (b(), N("div", We, f(e.modal.done.value.failed) + " " + f(e.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : G("", !0)
|
|
344
|
+
])) : (b(), N("div", Oe, [
|
|
336
345
|
n("div", ze, [
|
|
337
346
|
a[13] || (a[13] = n("label", {
|
|
338
347
|
class: "ce-label",
|
|
339
348
|
for: "skName"
|
|
340
349
|
}, "Position name", -1)),
|
|
341
|
-
|
|
350
|
+
se(n("input", {
|
|
342
351
|
id: "skName",
|
|
343
352
|
"onUpdate:modelValue": a[1] || (a[1] = (t) => e.modal.name.value = t),
|
|
344
353
|
class: "sch-input ce-input",
|
|
@@ -348,16 +357,16 @@ const xe = { class: "am-head" }, Te = {
|
|
|
348
357
|
onInput: a[2] || (a[2] = (t) => e.modal.nameError.value = !1),
|
|
349
358
|
onKeyup: a[3] || (a[3] = we((t) => e.modal.save(), ["enter"]))
|
|
350
359
|
}, null, 544), [
|
|
351
|
-
[
|
|
360
|
+
[oe, e.modal.name.value]
|
|
352
361
|
]),
|
|
353
362
|
n("div", {
|
|
354
|
-
class:
|
|
363
|
+
class: ie(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
|
|
355
364
|
}, f(e.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
|
|
356
365
|
]),
|
|
357
|
-
n("div",
|
|
358
|
-
n("div",
|
|
366
|
+
n("div", je, [
|
|
367
|
+
n("div", De, [
|
|
359
368
|
a[14] || (a[14] = n("span", { class: "asg-lbl" }, "Employees with this position", -1)),
|
|
360
|
-
|
|
369
|
+
R(O, {
|
|
361
370
|
hierarchy: "ghost",
|
|
362
371
|
size: "sm",
|
|
363
372
|
class: "ce-add-link asg-all",
|
|
@@ -369,18 +378,18 @@ const xe = { class: "am-head" }, Te = {
|
|
|
369
378
|
]),
|
|
370
379
|
_: 1
|
|
371
380
|
}),
|
|
372
|
-
n("span",
|
|
381
|
+
n("span", Le, f(e.modal.pickedIds.value.length) + " selected", 1)
|
|
373
382
|
]),
|
|
374
|
-
|
|
383
|
+
se(n("input", {
|
|
375
384
|
"onUpdate:modelValue": a[5] || (a[5] = (t) => e.modal.search.value = t),
|
|
376
385
|
class: "sch-input ce-input asg-search",
|
|
377
386
|
placeholder: "Search team…",
|
|
378
387
|
autocomplete: "off"
|
|
379
388
|
}, null, 512), [
|
|
380
|
-
[
|
|
389
|
+
[oe, e.modal.search.value]
|
|
381
390
|
]),
|
|
382
391
|
n("div", Ve, [
|
|
383
|
-
(
|
|
392
|
+
(b(!0), N(de, null, Ne(e.modal.visible.value, (t) => (b(), N("label", {
|
|
384
393
|
key: t.employeeId,
|
|
385
394
|
class: "asg-row"
|
|
386
395
|
}, [
|
|
@@ -388,32 +397,32 @@ const xe = { class: "am-head" }, Te = {
|
|
|
388
397
|
type: "checkbox",
|
|
389
398
|
class: "sch-checkbox asg-check",
|
|
390
399
|
checked: !!e.modal.picks[t.employeeId],
|
|
391
|
-
onChange: (
|
|
400
|
+
onChange: (c) => e.modal.toggle(t.employeeId),
|
|
392
401
|
"data-platform": "desktop"
|
|
393
402
|
}, null, 40, Be),
|
|
394
403
|
n("span", Fe, f(t.initials), 1),
|
|
395
404
|
n("span", Ke, [
|
|
396
405
|
n("span", Re, f(t.name), 1),
|
|
397
406
|
n("span", Ue, [
|
|
398
|
-
t.held.length ? (
|
|
407
|
+
t.held.length ? (b(), N(de, { key: 0 }, [
|
|
399
408
|
M(f(t.held.join(", ")), 1)
|
|
400
|
-
], 64)) : (
|
|
409
|
+
], 64)) : (b(), N("i", qe, "No positions added"))
|
|
401
410
|
])
|
|
402
411
|
])
|
|
403
412
|
]))), 128)),
|
|
404
|
-
e.modal.visible.value.length ? G("", !0) : (
|
|
413
|
+
e.modal.visible.value.length ? G("", !0) : (b(), N("div", Ge, " No one matches. "))
|
|
405
414
|
]),
|
|
406
415
|
a[15] || (a[15] = n("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
|
|
407
416
|
]),
|
|
408
417
|
n("div", {
|
|
409
|
-
class:
|
|
418
|
+
class: ie(["ce-err", { show: !!e.modal.error.value }])
|
|
410
419
|
}, f(e.modal.error.value), 3)
|
|
411
420
|
]))
|
|
412
421
|
]),
|
|
413
422
|
n("div", Xe, [
|
|
414
423
|
a[19] || (a[19] = n("div", { class: "am-cost-preview" }, null, -1)),
|
|
415
|
-
e.modal.done.value ? (
|
|
416
|
-
e.modal.editingId.value ? G("", !0) : (
|
|
424
|
+
e.modal.done.value ? (b(), N("div", Ze, [
|
|
425
|
+
e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
|
|
417
426
|
key: 0,
|
|
418
427
|
hierarchy: "secondary",
|
|
419
428
|
size: "sm",
|
|
@@ -426,7 +435,7 @@ const xe = { class: "am-head" }, Te = {
|
|
|
426
435
|
])]),
|
|
427
436
|
_: 1
|
|
428
437
|
})),
|
|
429
|
-
|
|
438
|
+
R(O, {
|
|
430
439
|
hierarchy: "primary",
|
|
431
440
|
size: "sm",
|
|
432
441
|
class: "am-btn am-btn-primary",
|
|
@@ -434,12 +443,12 @@ const xe = { class: "am-head" }, Te = {
|
|
|
434
443
|
onClick: a[10] || (a[10] = (t) => e.modal.close())
|
|
435
444
|
}, {
|
|
436
445
|
default: C(() => [
|
|
437
|
-
M(f(q(
|
|
446
|
+
M(f(q(s)("scheduling.common.done")), 1)
|
|
438
447
|
]),
|
|
439
448
|
_: 1
|
|
440
449
|
})
|
|
441
|
-
])) : (
|
|
442
|
-
|
|
450
|
+
])) : (b(), N("div", Ye, [
|
|
451
|
+
R(O, {
|
|
443
452
|
hierarchy: "secondary",
|
|
444
453
|
size: "sm",
|
|
445
454
|
class: "am-btn am-btn-sec",
|
|
@@ -447,11 +456,11 @@ const xe = { class: "am-head" }, Te = {
|
|
|
447
456
|
onClick: a[6] || (a[6] = (t) => e.modal.close())
|
|
448
457
|
}, {
|
|
449
458
|
default: C(() => [
|
|
450
|
-
M(f(q(
|
|
459
|
+
M(f(q(s)("scheduling.common.cancel")), 1)
|
|
451
460
|
]),
|
|
452
461
|
_: 1
|
|
453
462
|
}),
|
|
454
|
-
e.modal.editingId.value ? G("", !0) : (
|
|
463
|
+
e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
|
|
455
464
|
key: 0,
|
|
456
465
|
hierarchy: "secondary",
|
|
457
466
|
size: "sm",
|
|
@@ -465,7 +474,7 @@ const xe = { class: "am-head" }, Te = {
|
|
|
465
474
|
])]),
|
|
466
475
|
_: 1
|
|
467
476
|
}, 8, ["disabled"])),
|
|
468
|
-
|
|
477
|
+
R(O, {
|
|
469
478
|
hierarchy: "primary",
|
|
470
479
|
size: "sm",
|
|
471
480
|
class: "am-btn am-btn-primary",
|