@feedmepos/mf-hrm-portal 2.2.5-dev.6 → 2.2.5-dev.8
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-CtCpcbAC.js → ApprovalCodeList-BzL73nqc.js} +2 -2
- package/dist/{AuditLogList-BYOvk3l4.js → AuditLogList-BEZoHLsX.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DS4_vkTG.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DDrP7ywR.js} +2 -2
- package/dist/{EmployeeList-B_sTjkdO.js → EmployeeList-s4FYw1ZF.js} +5 -5
- package/dist/{GrantUserList-_nRUyHYM.js → GrantUserList-Ci_ElhHZ.js} +3 -3
- package/dist/{Main-CloHiemF.js → Main-BojQuzZI.js} +5 -5
- package/dist/{Main-DoLU6s-8.js → Main-CKr3RGvf.js} +2 -2
- package/dist/{Main-DqY2oGAM.js → Main-N1CNGDAy.js} +9 -9
- package/dist/{PermissionSetList-uL-0fN9H.js → PermissionSetList-DLknSOzA.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-dCgJ2s08.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DK2Bx8Aw.js} +1066 -1066
- package/dist/{RoleList-CwrDYFXz.js → RoleList-Cm7_q5l9.js} +7 -7
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DrJ1vA88.js +426 -0
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-DX5JR7bi.js +600 -0
- package/dist/ScheduleGeneralPage-CmR4BZAp.js +323 -0
- package/dist/SchedulePage-CN3ZsQ9E.js +13905 -0
- package/dist/SchedulePositionPage-Bv3zraaF.js +293 -0
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-Buu8NEQf.js +221 -0
- package/dist/{TeamMemberList-qyKCeSsW.js → TeamMemberList-D2OfkfJP.js} +6 -6
- package/dist/{TimesheetList-D1EJG90Z.js → TimesheetList-DEdLpYuM.js} +4 -4
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Car-HXjq.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BfMkNvCz.js} +1 -1
- package/dist/{app-By1O6mq8.js → app-Dmmpy4k-.js} +127 -127
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-_ZoZF_Ra.js → dayjs.min-DcfKURXN.js} +1 -1
- package/dist/{employee-BC7QM1dX.js → employee-D3ZpYH4j.js} +3 -3
- package/dist/{index-u10uXqFM.js → index-BxkisKEs.js} +1 -1
- package/dist/{index-CHf8MAN1.js → index-D-VlxJu9.js} +1 -1
- package/dist/{lodash-BsAtPIfh.js → lodash-p40sRkqQ.js} +1 -1
- package/dist/{role-PShfEEXE.js → role-CM1urkJZ.js} +1 -1
- package/dist/{rule-RU8uWecT.js → rule-BPApyMJY.js} +2 -2
- package/dist/src/api/schedule/index.d.ts +0 -3
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +1 -2
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +1 -2
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +1 -2
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +5 -1
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +5 -1
- package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +1 -1
- package/dist/src/views/scheduling/components/ScheduleEmployeeMenu.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +4 -2
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +3 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +14 -0
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +5 -1
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +4 -2
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +4 -2
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +2 -4
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +1 -0
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +1 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +14 -7
- package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +11 -2
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +8 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -5
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +5 -3
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +7 -1
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +53 -3
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1181 -55
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +10 -1
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +6 -0
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +5 -5
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +6 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +7 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +6 -1
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
- package/dist/src/views/scheduling/data.d.ts +6 -1
- package/dist/src/views/scheduling/schedule-store.d.ts +11 -1
- package/dist/src/views/scheduling/types.d.ts +9 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-Bu-l3ebR.js → useReportPermissions-5EhPvVT9.js} +3 -3
- package/package.json +1 -1
- package/dist/ScheduleGeneralPage-CgQOHHb8.js +0 -242
- package/dist/SchedulePage-C7q1IL70.js +0 -10761
- package/dist/SchedulePositionPage-Dys7X035.js +0 -220
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-Cm2VWp8s.js +0 -201
- package/dist/useScheduleOutlet-BOmEn1hr.js +0 -546
- package/dist/useSchedulePositions-upgaNffa.js +0 -103
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, onMounted as h, createElementBlock as a, openBlock as d, createElementVNode as s, toDisplayString as l, unref as t, normalizeClass as c, createTextVNode as g, createCommentVNode as _, withDirectives as m, withKeys as u, vModelText as p, Fragment as v, renderList as C, withModifiers as r } from "vue";
|
|
2
|
-
import { useRouter as w } from "vue-router";
|
|
3
|
-
import { R as $ } from "./app-By1O6mq8.js";
|
|
4
|
-
import { x as D, y as A } from "./useScheduleOutlet-BOmEn1hr.js";
|
|
5
|
-
import { u as N } from "./useSchedulePositions-upgaNffa.js";
|
|
6
|
-
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const x = { class: "sch9" }, M = { class: "main" }, S = {
|
|
8
|
-
id: "viewPositions",
|
|
9
|
-
class: "view"
|
|
10
|
-
}, P = { class: "sp-body" }, B = { class: "sp-content" }, F = { class: "sp-panel" }, V = { class: "cfg-head" }, I = { class: "cfg-count" }, K = { id: "skList" }, L = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "cfg-empty"
|
|
13
|
-
}, R = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "cfg-list"
|
|
16
|
-
}, U = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "cfg-row"
|
|
19
|
-
}, W = { class: "cfg-main" }, j = ["disabled"], T = ["disabled"], q = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "cfg-row"
|
|
22
|
-
}, z = { class: "cfg-main" }, H = ["onKeyup"], O = ["disabled", "onClick"], G = ["disabled"], J = ["onClick"], Q = { class: "cfg-main" }, X = { class: "cfg-name" }, Y = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "cfg-confirm"
|
|
25
|
-
}, Z = { class: "q" }, ee = ["disabled", "onClick"], te = ["disabled"], se = ["onClick"], oe = ["aria-label", "onClick"], ne = /* @__PURE__ */ y({
|
|
26
|
-
__name: "SchedulePositionPage",
|
|
27
|
-
setup(ie) {
|
|
28
|
-
const f = w(), e = N(), b = D();
|
|
29
|
-
h(async () => {
|
|
30
|
-
await b.resolve() && await A(/* @__PURE__ */ new Date());
|
|
31
|
-
});
|
|
32
|
-
function k() {
|
|
33
|
-
f.push({ name: $.SCHEDULE });
|
|
34
|
-
}
|
|
35
|
-
return (ae, o) => (d(), a("div", x, [
|
|
36
|
-
s("div", M, [
|
|
37
|
-
s("div", S, [
|
|
38
|
-
s("div", { class: "sp-head" }, [
|
|
39
|
-
s("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
class: "sp-back",
|
|
42
|
-
onClick: k
|
|
43
|
-
}, [...o[10] || (o[10] = [
|
|
44
|
-
s("svg", {
|
|
45
|
-
width: "12",
|
|
46
|
-
height: "12",
|
|
47
|
-
viewBox: "0 0 16 16",
|
|
48
|
-
fill: "none",
|
|
49
|
-
"aria-hidden": "true"
|
|
50
|
-
}, [
|
|
51
|
-
s("path", {
|
|
52
|
-
d: "M10 3.5L5.5 8l4.5 4.5",
|
|
53
|
-
stroke: "currentColor",
|
|
54
|
-
"stroke-width": "1.7",
|
|
55
|
-
"stroke-linecap": "round",
|
|
56
|
-
"stroke-linejoin": "round"
|
|
57
|
-
})
|
|
58
|
-
], -1),
|
|
59
|
-
s("span", null, "Back to schedule", -1)
|
|
60
|
-
])]),
|
|
61
|
-
o[11] || (o[11] = s("div", { class: "sp-title" }, "Position", -1)),
|
|
62
|
-
o[12] || (o[12] = s("div", { class: "sp-sub" }, "What your staff can do — the same catalogue across every outlet.", -1))
|
|
63
|
-
]),
|
|
64
|
-
s("div", P, [
|
|
65
|
-
s("div", B, [
|
|
66
|
-
s("div", F, [
|
|
67
|
-
o[17] || (o[17] = s("div", { class: "cfg-lead" }, " What your staff can do. Positions drive who Auto-Schedule considers for a shift, and the top-ranked position on a person wins when more than one could cover it. ", -1)),
|
|
68
|
-
s("div", V, [
|
|
69
|
-
o[13] || (o[13] = s("div", { class: "cfg-title" }, "Configured positions", -1)),
|
|
70
|
-
s("span", I, l(t(e).count.value), 1),
|
|
71
|
-
o[14] || (o[14] = s("span", { class: "cfg-spacer" }, null, -1)),
|
|
72
|
-
s("button", {
|
|
73
|
-
type: "button",
|
|
74
|
-
class: "am-btn am-btn-primary",
|
|
75
|
-
onClick: o[0] || (o[0] = (n) => t(e).startAdd())
|
|
76
|
-
}, " + Add position ")
|
|
77
|
-
]),
|
|
78
|
-
s("div", {
|
|
79
|
-
class: c(["ce-err", { show: t(e).error.value }])
|
|
80
|
-
}, l(t(e).error.value), 3),
|
|
81
|
-
s("div", K, [
|
|
82
|
-
!t(e).positions.value.length && !t(e).isAdding.value ? (d(), a("div", L, [...o[15] || (o[15] = [
|
|
83
|
-
g(" No positions yet.", -1),
|
|
84
|
-
s("br", null, null, -1),
|
|
85
|
-
g(" Add one and it becomes assignable on every employee. ", -1)
|
|
86
|
-
])])) : (d(), a("div", R, [
|
|
87
|
-
t(e).isAdding.value ? (d(), a("div", U, [
|
|
88
|
-
s("div", W, [
|
|
89
|
-
m(s("input", {
|
|
90
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(e).newName.value = n),
|
|
91
|
-
type: "text",
|
|
92
|
-
class: "cfg-name-input",
|
|
93
|
-
placeholder: "New position name",
|
|
94
|
-
autofocus: "",
|
|
95
|
-
onKeyup: [
|
|
96
|
-
o[2] || (o[2] = u((n) => t(e).confirmAdd(), ["enter"])),
|
|
97
|
-
o[3] || (o[3] = u((n) => t(e).cancelAdd(), ["esc"]))
|
|
98
|
-
]
|
|
99
|
-
}, null, 544), [
|
|
100
|
-
[p, t(e).newName.value]
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
s("button", {
|
|
104
|
-
type: "button",
|
|
105
|
-
class: "cfg-btn",
|
|
106
|
-
disabled: !t(e).newName.value.trim() || t(e).saving.value,
|
|
107
|
-
onClick: o[4] || (o[4] = (n) => t(e).confirmAdd())
|
|
108
|
-
}, l(t(e).saving.value ? "Adding…" : "Add"), 9, j),
|
|
109
|
-
s("button", {
|
|
110
|
-
type: "button",
|
|
111
|
-
class: "cfg-btn",
|
|
112
|
-
disabled: t(e).saving.value,
|
|
113
|
-
onClick: o[5] || (o[5] = (n) => t(e).cancelAdd())
|
|
114
|
-
}, " Cancel ", 8, T)
|
|
115
|
-
])) : _("", !0),
|
|
116
|
-
(d(!0), a(v, null, C(t(e).positions.value, (n) => (d(), a(v, {
|
|
117
|
-
key: n.id
|
|
118
|
-
}, [
|
|
119
|
-
t(e).editingId.value === n.id ? (d(), a("div", q, [
|
|
120
|
-
s("div", z, [
|
|
121
|
-
m(s("input", {
|
|
122
|
-
"onUpdate:modelValue": o[6] || (o[6] = (i) => t(e).editingName.value = i),
|
|
123
|
-
type: "text",
|
|
124
|
-
class: "cfg-name-input",
|
|
125
|
-
autofocus: "",
|
|
126
|
-
onKeyup: [
|
|
127
|
-
u((i) => t(e).saveEdit(n.id), ["enter"]),
|
|
128
|
-
o[7] || (o[7] = u((i) => t(e).cancelEdit(), ["esc"]))
|
|
129
|
-
]
|
|
130
|
-
}, null, 40, H), [
|
|
131
|
-
[p, t(e).editingName.value]
|
|
132
|
-
])
|
|
133
|
-
]),
|
|
134
|
-
s("button", {
|
|
135
|
-
type: "button",
|
|
136
|
-
class: "cfg-btn",
|
|
137
|
-
disabled: !t(e).editingName.value.trim() || t(e).saving.value,
|
|
138
|
-
onClick: (i) => t(e).saveEdit(n.id)
|
|
139
|
-
}, l(t(e).saving.value ? "Saving…" : "Save"), 9, O),
|
|
140
|
-
s("button", {
|
|
141
|
-
type: "button",
|
|
142
|
-
class: "cfg-btn",
|
|
143
|
-
disabled: t(e).saving.value,
|
|
144
|
-
onClick: o[8] || (o[8] = (i) => t(e).cancelEdit())
|
|
145
|
-
}, " Cancel ", 8, G)
|
|
146
|
-
])) : (d(), a("div", {
|
|
147
|
-
key: 1,
|
|
148
|
-
class: c(["cfg-row", { "is-clickable": t(e).pendingDeleteId.value !== n.id }]),
|
|
149
|
-
onClick: (i) => t(e).pendingDeleteId.value !== n.id && t(e).startEdit(n.id)
|
|
150
|
-
}, [
|
|
151
|
-
s("div", Q, [
|
|
152
|
-
s("div", X, l(n.name), 1)
|
|
153
|
-
]),
|
|
154
|
-
t(e).pendingDeleteId.value === n.id ? (d(), a("div", Y, [
|
|
155
|
-
s("span", Z, l(t(e).usageCountFor(n.name) ? `Remove from ${t(e).usageCountFor(n.name)} staff?` : "Delete?"), 1),
|
|
156
|
-
s("button", {
|
|
157
|
-
type: "button",
|
|
158
|
-
class: "cfg-yes",
|
|
159
|
-
disabled: t(e).saving.value,
|
|
160
|
-
onClick: r((i) => t(e).confirmDelete(n.id), ["stop"])
|
|
161
|
-
}, l(t(e).saving.value ? "Deleting…" : "Delete"), 9, ee),
|
|
162
|
-
s("button", {
|
|
163
|
-
type: "button",
|
|
164
|
-
class: "cfg-no",
|
|
165
|
-
disabled: t(e).saving.value,
|
|
166
|
-
onClick: o[9] || (o[9] = r((i) => t(e).cancelDelete(), ["stop"]))
|
|
167
|
-
}, " Keep ", 8, te)
|
|
168
|
-
])) : (d(), a(v, { key: 1 }, [
|
|
169
|
-
s("span", {
|
|
170
|
-
class: c(["cfg-used", { none: !t(e).usageCountFor(n.name) }])
|
|
171
|
-
}, l(t(e).usageCountFor(n.name) ? `${t(e).usageCountFor(n.name)} staff` : "unused"), 3),
|
|
172
|
-
s("button", {
|
|
173
|
-
type: "button",
|
|
174
|
-
class: "cfg-btn",
|
|
175
|
-
onClick: r((i) => t(e).startEdit(n.id), ["stop"])
|
|
176
|
-
}, " Edit ", 8, se),
|
|
177
|
-
s("button", {
|
|
178
|
-
type: "button",
|
|
179
|
-
class: "cfg-del",
|
|
180
|
-
"aria-label": `Delete ${n.name}`,
|
|
181
|
-
onClick: r((i) => t(e).askDelete(n.id), ["stop"])
|
|
182
|
-
}, [...o[16] || (o[16] = [
|
|
183
|
-
s("svg", {
|
|
184
|
-
width: "14",
|
|
185
|
-
height: "14",
|
|
186
|
-
viewBox: "0 0 16 16",
|
|
187
|
-
fill: "none",
|
|
188
|
-
"aria-hidden": "true"
|
|
189
|
-
}, [
|
|
190
|
-
s("path", {
|
|
191
|
-
d: "M2.5 4.5h11M6 4.5V3a.8.8 0 0 1 .8-.8h2.4a.8.8 0 0 1 .8.8v1.5M4 4.5l.6 8.2a1 1 0 0 0 1 .93h4.8a1 1 0 0 0 1-.93l.6-8.2",
|
|
192
|
-
stroke: "currentColor",
|
|
193
|
-
"stroke-width": "1.4",
|
|
194
|
-
"stroke-linecap": "round",
|
|
195
|
-
"stroke-linejoin": "round"
|
|
196
|
-
}),
|
|
197
|
-
s("path", {
|
|
198
|
-
d: "M6.6 7v4M9.4 7v4",
|
|
199
|
-
stroke: "currentColor",
|
|
200
|
-
"stroke-width": "1.3",
|
|
201
|
-
"stroke-linecap": "round"
|
|
202
|
-
})
|
|
203
|
-
], -1)
|
|
204
|
-
])], 8, oe)
|
|
205
|
-
], 64))
|
|
206
|
-
], 10, J))
|
|
207
|
-
], 64))), 128))
|
|
208
|
-
]))
|
|
209
|
-
])
|
|
210
|
-
])
|
|
211
|
-
])
|
|
212
|
-
])
|
|
213
|
-
])
|
|
214
|
-
])
|
|
215
|
-
]));
|
|
216
|
-
}
|
|
217
|
-
}), ge = /* @__PURE__ */ E(ne, [["__scopeId", "data-v-1c99a674"]]);
|
|
218
|
-
export {
|
|
219
|
-
ge as default
|
|
220
|
-
};
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { ref as m, reactive as G, computed as b, defineComponent as K, useAttrs as q, onBeforeUnmount as Q, createElementBlock as p, openBlock as d, normalizeClass as L, createElementVNode as h, createBlock as X, mergeProps as Y, toDisplayString as O, Teleport as Z, createCommentVNode as ee, Fragment as J, renderList as te, createTextVNode as oe, nextTick as ne } from "vue";
|
|
2
|
-
import { b as a } from "./useScheduleOutlet-BOmEn1hr.js";
|
|
3
|
-
const ce = [
|
|
4
|
-
{ key: "overtime", label: "Overtime" }
|
|
5
|
-
];
|
|
6
|
-
function C() {
|
|
7
|
-
return JSON.parse(
|
|
8
|
-
JSON.stringify({
|
|
9
|
-
salesForecast: a.salesForecast,
|
|
10
|
-
labourTarget: a.labourTarget,
|
|
11
|
-
budgetFromSales: a.budgetFromSales,
|
|
12
|
-
budget: a.budget,
|
|
13
|
-
payRate: a.payRate,
|
|
14
|
-
otCapHours: a.otCapHours,
|
|
15
|
-
otBudget: a.otBudget,
|
|
16
|
-
notify: a.notify
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function de() {
|
|
21
|
-
const l = m(!1), y = m("overtime"), n = G(C());
|
|
22
|
-
function k(f) {
|
|
23
|
-
Object.assign(n, C()), y.value = f ?? "overtime", l.value = !0;
|
|
24
|
-
}
|
|
25
|
-
const x = b(() => JSON.stringify(n) !== JSON.stringify(C()));
|
|
26
|
-
function M() {
|
|
27
|
-
return x.value ? !1 : (l.value = !1, !0);
|
|
28
|
-
}
|
|
29
|
-
function i() {
|
|
30
|
-
Object.assign(n, C()), l.value = !1;
|
|
31
|
-
}
|
|
32
|
-
function S() {
|
|
33
|
-
a.salesForecast = n.salesForecast, a.labourTarget = n.labourTarget, a.budgetFromSales = n.budgetFromSales, a.budget = n.budget, a.payRate = JSON.parse(JSON.stringify(n.payRate)), a.otCapHours = n.otCapHours, a.otBudget = n.otBudget, a.notify = JSON.parse(JSON.stringify(n.notify)), l.value = !1;
|
|
34
|
-
}
|
|
35
|
-
return { isOpen: l, activeSection: y, draft: n, dirty: x, open: k, close: M, discard: i, save: S };
|
|
36
|
-
}
|
|
37
|
-
const ae = ["disabled", "aria-expanded"], ie = { class: "sch9" }, se = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "fx-grp"
|
|
40
|
-
}, le = ["aria-selected", "onClick"], fe = /* @__PURE__ */ K({
|
|
41
|
-
inheritAttrs: !1,
|
|
42
|
-
__name: "ScheduleSelect",
|
|
43
|
-
props: {
|
|
44
|
-
modelValue: {},
|
|
45
|
-
options: {},
|
|
46
|
-
disabled: { type: Boolean }
|
|
47
|
-
},
|
|
48
|
-
emits: ["update:modelValue"],
|
|
49
|
-
setup(l, { emit: y }) {
|
|
50
|
-
const n = l, k = y, x = q(), M = b(() => x.class ?? ""), i = m(!1), S = m(null), f = m(null), E = m(null), _ = b(
|
|
51
|
-
() => {
|
|
52
|
-
var e;
|
|
53
|
-
return ((e = n.options.find((t) => t.value === n.modelValue)) == null ? void 0 : e.label) ?? "";
|
|
54
|
-
}
|
|
55
|
-
), $ = b(() => {
|
|
56
|
-
const e = [];
|
|
57
|
-
let t;
|
|
58
|
-
for (const o of n.options)
|
|
59
|
-
o.group !== t && (t = o.group, t && e.push({ heading: t })), e.push({ option: o });
|
|
60
|
-
return e;
|
|
61
|
-
}), v = 5, r = 8;
|
|
62
|
-
function B() {
|
|
63
|
-
const e = E.value, t = f.value;
|
|
64
|
-
if (!e || !t) return;
|
|
65
|
-
const o = t.getBoundingClientRect(), u = window.innerWidth || document.documentElement.clientWidth, s = window.innerHeight || document.documentElement.clientHeight;
|
|
66
|
-
e.style.minWidth = `${Math.round(o.width)}px`, e.style.maxWidth = `${Math.max(180, Math.round(u - r * 2))}px`;
|
|
67
|
-
const g = s - o.bottom - v - r, z = o.top - v - r;
|
|
68
|
-
e.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(g, z)))}px`;
|
|
69
|
-
const w = e.offsetHeight, P = e.offsetWidth;
|
|
70
|
-
let N = o.bottom + v;
|
|
71
|
-
N + w > s - r && (N = o.top - v - w >= r ? o.top - v - w : Math.max(r, s - w - r));
|
|
72
|
-
const U = Math.min(Math.max(r, o.left), Math.max(r, u - P - r));
|
|
73
|
-
e.style.top = `${Math.round(N)}px`, e.style.left = `${Math.round(U)}px`, e.style.visibility = "visible";
|
|
74
|
-
}
|
|
75
|
-
function H(e) {
|
|
76
|
-
var o;
|
|
77
|
-
const t = e.target;
|
|
78
|
-
t && ((o = S.value) != null && o.contains(t)) || c();
|
|
79
|
-
}
|
|
80
|
-
function T(e) {
|
|
81
|
-
const t = E.value, o = e.target;
|
|
82
|
-
if (t && o && o !== document && t.contains(o)) return;
|
|
83
|
-
const u = f.value;
|
|
84
|
-
if (!u) return;
|
|
85
|
-
const s = u.getBoundingClientRect(), g = window.innerHeight || document.documentElement.clientHeight;
|
|
86
|
-
if (s.bottom < 0 || s.top > g) {
|
|
87
|
-
c();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
B();
|
|
91
|
-
}
|
|
92
|
-
function A() {
|
|
93
|
-
document.addEventListener("click", H), document.addEventListener("scroll", T, !0), window.addEventListener("resize", c);
|
|
94
|
-
}
|
|
95
|
-
function D() {
|
|
96
|
-
document.removeEventListener("click", H), document.removeEventListener("scroll", T, !0), window.removeEventListener("resize", c);
|
|
97
|
-
}
|
|
98
|
-
async function V() {
|
|
99
|
-
var e, t;
|
|
100
|
-
n.disabled || i.value || (i.value = !0, await ne(), B(), (t = (e = E.value) == null ? void 0 : e.querySelector(".fx-opt.is-on")) == null || t.scrollIntoView({ block: "nearest" }), A());
|
|
101
|
-
}
|
|
102
|
-
function c() {
|
|
103
|
-
i.value && (i.value = !1, D());
|
|
104
|
-
}
|
|
105
|
-
function F() {
|
|
106
|
-
i.value ? c() : V();
|
|
107
|
-
}
|
|
108
|
-
function R(e) {
|
|
109
|
-
e.disabled || (c(), e.value !== n.modelValue && k("update:modelValue", e.value));
|
|
110
|
-
}
|
|
111
|
-
const W = b(() => n.options.filter((e) => !e.disabled));
|
|
112
|
-
function I(e) {
|
|
113
|
-
const t = W.value;
|
|
114
|
-
if (!t.length) {
|
|
115
|
-
V();
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const o = t.findIndex((g) => g.value === n.modelValue), u = e === "Home" ? 0 : e === "End" ? t.length - 1 : e === "ArrowDown" ? Math.min(t.length - 1, (o < 0 ? -1 : o) + 1) : Math.max(0, (o < 0 ? 1 : o) - 1), s = t[u];
|
|
119
|
-
s && s.value !== n.modelValue ? k("update:modelValue", s.value) : V();
|
|
120
|
-
}
|
|
121
|
-
function j(e) {
|
|
122
|
-
var t;
|
|
123
|
-
if (e.key === "Escape") {
|
|
124
|
-
if (!i.value) return;
|
|
125
|
-
e.preventDefault(), c(), (t = f.value) == null || t.focus();
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
129
|
-
e.preventDefault(), F();
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End" || (e.preventDefault(), I(e.key));
|
|
133
|
-
}
|
|
134
|
-
return Q(D), (e, t) => (d(), p("div", {
|
|
135
|
-
ref_key: "rootEl",
|
|
136
|
-
ref: S,
|
|
137
|
-
class: L(["fx-sel", M.value])
|
|
138
|
-
}, [
|
|
139
|
-
h("button", Y({
|
|
140
|
-
ref_key: "btnEl",
|
|
141
|
-
ref: f
|
|
142
|
-
}, e.$attrs, {
|
|
143
|
-
type: "button",
|
|
144
|
-
class: ["fx-btn", { "is-open": i.value }],
|
|
145
|
-
disabled: l.disabled,
|
|
146
|
-
"aria-haspopup": "listbox",
|
|
147
|
-
"aria-expanded": i.value,
|
|
148
|
-
onClick: t[0] || (t[0] = (o) => F()),
|
|
149
|
-
onKeydown: j
|
|
150
|
-
}), O(_.value), 17, ae),
|
|
151
|
-
(d(), X(Z, { to: "body" }, [
|
|
152
|
-
h("div", ie, [
|
|
153
|
-
i.value ? (d(), p("div", {
|
|
154
|
-
key: 0,
|
|
155
|
-
ref_key: "popEl",
|
|
156
|
-
ref: E,
|
|
157
|
-
class: "fx-pop",
|
|
158
|
-
role: "listbox",
|
|
159
|
-
style: { visibility: "hidden" }
|
|
160
|
-
}, [
|
|
161
|
-
(d(!0), p(J, null, te($.value, (o, u) => (d(), p(J, { key: u }, [
|
|
162
|
-
"heading" in o ? (d(), p("div", se, O(o.heading), 1)) : (d(), p("div", {
|
|
163
|
-
key: 1,
|
|
164
|
-
class: L(["fx-opt", { "is-on": o.option.value === l.modelValue, "is-off": o.option.disabled }]),
|
|
165
|
-
role: "option",
|
|
166
|
-
"aria-selected": o.option.value === l.modelValue,
|
|
167
|
-
onClick: (s) => R(o.option)
|
|
168
|
-
}, [
|
|
169
|
-
t[1] || (t[1] = h("span", {
|
|
170
|
-
class: "fx-tick",
|
|
171
|
-
"aria-hidden": "true"
|
|
172
|
-
}, [
|
|
173
|
-
h("svg", {
|
|
174
|
-
width: "11",
|
|
175
|
-
height: "11",
|
|
176
|
-
viewBox: "0 0 16 16",
|
|
177
|
-
fill: "none"
|
|
178
|
-
}, [
|
|
179
|
-
h("path", {
|
|
180
|
-
d: "m3.5 8.4 3 3 6-7",
|
|
181
|
-
stroke: "currentColor",
|
|
182
|
-
"stroke-width": "2.2",
|
|
183
|
-
"stroke-linecap": "round",
|
|
184
|
-
"stroke-linejoin": "round"
|
|
185
|
-
})
|
|
186
|
-
])
|
|
187
|
-
], -1)),
|
|
188
|
-
oe(" " + O(o.option.label), 1)
|
|
189
|
-
], 10, le))
|
|
190
|
-
], 64))), 128))
|
|
191
|
-
], 512)) : ee("", !0)
|
|
192
|
-
])
|
|
193
|
-
]))
|
|
194
|
-
], 2));
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
export {
|
|
198
|
-
ce as S,
|
|
199
|
-
fe as _,
|
|
200
|
-
de as u
|
|
201
|
-
};
|