@feedmepos/mf-hrm-portal 2.3.0-dev.2 → 2.3.0-dev.21

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.
Files changed (127) hide show
  1. package/dist/{ApprovalCodeList-CJaNPHZC.js → ApprovalCodeList-DuPmMQ8Z.js} +7 -7
  2. package/dist/{AuditLogList-CHA98ZqW.js → AuditLogList-BeRA_284.js} +18 -19
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7rvthEI.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-StnBAQOk.js} +2 -2
  4. package/dist/{EmployeeList-CVmMKt71.js → EmployeeList-qmjsbCjj.js} +255 -266
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-oQJgMciC.js} +6 -6
  6. package/dist/{GrantUserList-MYjgt5-F.js → GrantUserList--WUK7zrV.js} +8 -8
  7. package/dist/{Main-hlcHtrsc.js → Main-9X2iCXoX.js} +5 -5
  8. package/dist/{Main-C0cnqQ3B.js → Main-BIAeEQV9.js} +8 -8
  9. package/dist/{Main-BgB9lD4K.js → Main-tPL_YTwT.js} +11 -11
  10. package/dist/{PermissionSetList-5f1WIaVa.js → PermissionSetList-ByTyQe0s.js} +19 -18
  11. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bp9WwlnI.js +4167 -0
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fe-Rdwn4.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
  13. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  14. package/dist/{RoleList-DNR4miXr.js → RoleList-INlydQmP.js} +21 -20
  15. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-d8KDvgNu.js +530 -0
  16. package/dist/ScheduleGeneralPage-DbOoP9Ez.js +776 -0
  17. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-UowMybGr.js +2439 -0
  18. package/dist/SchedulePage-CjOZtRlK.js +19291 -0
  19. package/dist/{SchedulePositionPage-DyRckyUx.js → SchedulePositionPage-CnDqkvL9.js} +78 -80
  20. package/dist/{SelectFilter-CG13h83-.js → SelectFilter-BWw4B9tM.js} +1 -1
  21. package/dist/{TeamMemberList-mw5OveZG.js → TeamMemberList-BgYtoXht.js} +27 -27
  22. package/dist/{TimesheetList-BzXarZbM.js → TimesheetList-Dg0QYsWO.js} +52 -53
  23. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dq5i4poN.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-eTd4J1CB.js} +3 -3
  24. package/dist/{app-DSsdRLHg.js → app-CDo04LrB.js} +2891 -2474
  25. package/dist/app.js +1 -1
  26. package/dist/{approval-code-C9DmR4Md.js → approval-code-BXUiojPH.js} +1 -1
  27. package/dist/{dayjs.min-B6xBXQtU.js → dayjs.min-KFBmxZF3.js} +1 -1
  28. package/dist/{employee-hMhzuqk1.js → employee-BRaYoaOY.js} +4 -4
  29. package/dist/{grant-user-Bv-pJ9Wt.js → grant-user-CBJ3gEgW.js} +1 -1
  30. package/dist/{iteration-B34AvpNC.js → iteration-p-TjO05t.js} +1 -1
  31. package/dist/{lodash-1Vyuy7Mu.js → lodash-D72lpJgs.js} +1 -1
  32. package/dist/object-Dwyg2LgX.js +16 -0
  33. package/dist/{restaurant-D7PEQjPY.js → restaurant-D2mfKHaH.js} +48 -48
  34. package/dist/{role-DKOrgO6f.js → role-a35Vc8gC.js} +2 -2
  35. package/dist/{rule-CBzQ3GeV.js → rule-BRRw0K7p.js} +3 -3
  36. package/dist/src/api/schedule/index.d.ts +9 -1
  37. package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
  38. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  39. package/dist/src/types/schedule.d.ts +3 -4
  40. package/dist/src/views/audit-log/locales/index.d.ts +252 -0
  41. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +4 -8
  42. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +1 -4
  43. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +0 -2
  44. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +0 -7
  45. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +5 -0
  46. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +0 -6
  47. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +1 -0
  48. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +0 -1
  49. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +4 -1
  50. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +1 -5
  51. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +5 -0
  52. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +0 -1
  53. package/dist/src/views/scheduling/components/{ScheduleAssignEmployeePopover.vue.d.ts → ScheduleOnboardingAssignPositionModal.vue.d.ts} +2 -2
  54. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  55. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  56. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +10 -0
  57. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +0 -10
  58. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
  59. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -2
  60. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +12 -8
  61. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +4 -0
  62. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +1 -3
  63. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +13 -1
  64. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  65. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +22 -0
  66. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +3 -0
  67. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +6 -0
  68. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +29 -11
  69. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +3 -11
  70. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -13
  71. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +2 -9
  72. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +11 -3
  73. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +86 -11
  74. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +3 -10
  75. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +13 -1
  76. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -1
  77. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +16 -5
  78. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +3 -5
  79. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +13 -3
  80. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +1 -0
  81. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +20 -7
  82. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +1 -1
  83. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +5 -1
  84. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +5 -0
  85. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +2 -2
  86. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +2 -0
  87. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +1 -1
  88. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +47 -3
  89. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +408 -29
  90. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +11 -8
  91. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +3 -1
  92. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +1 -0
  93. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +0 -4
  94. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +1 -0
  95. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +7 -1
  96. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +2 -0
  97. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +70 -4
  98. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +7 -2
  99. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +2 -2
  100. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +41 -3
  101. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -0
  102. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +47 -6
  103. package/dist/src/views/scheduling/country-rules/index.d.ts +9 -4
  104. package/dist/src/views/scheduling/data.d.ts +22 -1
  105. package/dist/src/views/scheduling/locales/index.d.ts +28 -0
  106. package/dist/src/views/scheduling/schedule-state.d.ts +272 -208
  107. package/dist/src/views/scheduling/schedule-store.d.ts +36 -11
  108. package/dist/src/views/scheduling/types.d.ts +30 -5
  109. package/dist/style.css +1 -1
  110. package/dist/tsconfig.app.tsbuildinfo +1 -1
  111. package/dist/{useAppStore-d_nHyK5u.js → useAppStore-DZCdxlCd.js} +1 -1
  112. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  113. package/dist/{useLoading-JFoghhRz.js → useLoading-Nygx2zn8.js} +1 -1
  114. package/dist/{useReportPermissions-B2ev0j4w.js → useReportPermissions-Ca-9DEOI.js} +3 -3
  115. package/package.json +1 -1
  116. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFoTAGIX.js +0 -4167
  117. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B4VUyKW3.js +0 -470
  118. package/dist/ScheduleGeneralPage-Cd5AlY4z.js +0 -666
  119. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-Cf0l2MRg.js +0 -2188
  120. package/dist/SchedulePage-C8m0-m3l.js +0 -18257
  121. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  122. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +0 -22
  123. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +0 -14
  124. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +0 -77
  125. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +0 -124
  126. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +0 -23
  127. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -1,666 +0,0 @@
1
- import { ref as f, reactive as V, computed as I, defineComponent as P, createBlock as T, openBlock as u, withCtx as g, createElementVNode as e, createVNode as b, createElementBlock as p, Fragment as D, createTextVNode as w, toDisplayString as y, withDirectives as S, vModelText as R, createCommentVNode as E, renderList as B, onMounted as z, unref as o, normalizeClass as U } from "vue";
2
- import { useRouter as Y } from "vue-router";
3
- import { useSnackbar as q } from "@feedmepos/ui-library";
4
- import { R as G } from "./app-DSsdRLHg.js";
5
- import { b as h, o as H, K as N, am as F, ak as C, an as j, ao as W, a7 as J, al as K } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-Cf0l2MRg.js";
6
- import "./iteration-B34AvpNC.js";
7
- import "@feedmepos/mf-common";
8
- import "./employee-hMhzuqk1.js";
9
- const Q = [
10
- { key: "payrates", label: "Pay rates" },
11
- { key: "overtime", label: "Overtime" }
12
- ];
13
- function A() {
14
- return structuredClone({
15
- // RULES is reactive, so spreading each rate tier first gives structuredClone plain
16
- // objects instead of Vue Proxy instances, which structuredClone cannot clone.
17
- payRate: {
18
- NORMAL: { ...h.payRate.NORMAL },
19
- REST_DAY: { ...h.payRate.REST_DAY },
20
- PUBLIC_HOLIDAY: { ...h.payRate.PUBLIC_HOLIDAY }
21
- },
22
- otCapHours: h.otCapHours
23
- });
24
- }
25
- function X() {
26
- const l = f(!1), v = f("payrates"), s = V(A()), i = f(!1);
27
- let a = 0;
28
- async function d() {
29
- if (!H.value) return;
30
- const m = ++a, O = H.value;
31
- i.value = !0;
32
- try {
33
- const n = await N.getSettings(O);
34
- if (m !== a || H.value !== O) return;
35
- h.payRate = structuredClone(n.payRate), h.otCapHours = n.overtime.maxMonthlyHours;
36
- } finally {
37
- m === a && (i.value = !1);
38
- }
39
- }
40
- function k(m) {
41
- Object.assign(s, A()), v.value = m ?? "payrates", l.value = !0;
42
- }
43
- const c = I(() => JSON.stringify(s) !== JSON.stringify(A()));
44
- function x() {
45
- return c.value ? !1 : (l.value = !1, !0);
46
- }
47
- function $() {
48
- Object.assign(s, A()), l.value = !1;
49
- }
50
- async function L() {
51
- if (!H.value) throw new Error("No outlet selected");
52
- const m = await N.saveSettings(H.value, {
53
- payRate: s.payRate,
54
- overtime: { maxMonthlyHours: s.otCapHours }
55
- });
56
- h.payRate = structuredClone(m.payRate), h.otCapHours = m.overtime.maxMonthlyHours, l.value = !1;
57
- }
58
- return { isOpen: l, activeSection: v, draft: s, dirty: c, loading: i, load: d, open: k, close: x, discard: $, save: L };
59
- }
60
- function Z(l, v = {}) {
61
- const s = f(!1), i = f(""), a = f(/* @__PURE__ */ new Set()), d = f(!1), k = f(null), c = I(
62
- () => {
63
- var n;
64
- return ((n = l.options.value.find((t) => t.value === l.outletId.value)) == null ? void 0 : n.label) ?? "";
65
- }
66
- ), x = I(() => {
67
- const n = i.value.trim().toLowerCase();
68
- return l.options.value.filter(
69
- (t) => t.value !== l.outletId.value && (!n || t.label.toLowerCase().includes(n))
70
- );
71
- });
72
- function $() {
73
- i.value = "", a.value = /* @__PURE__ */ new Set(), d.value = !1, k.value = null, s.value = !0;
74
- }
75
- function L() {
76
- s.value = !1;
77
- }
78
- function m(n) {
79
- const t = new Set(a.value);
80
- t.has(n) ? t.delete(n) : t.add(n), a.value = t;
81
- }
82
- async function O() {
83
- var t, r;
84
- const n = [...a.value];
85
- if (!(!n.length || d.value)) {
86
- d.value = !0;
87
- try {
88
- await Promise.all(
89
- n.map(
90
- (M) => N.saveSettings(M, {
91
- payRate: h.payRate,
92
- overtime: { maxMonthlyHours: h.otCapHours }
93
- })
94
- )
95
- ), k.value = n.length, (t = v.notify) == null || t.call(
96
- v,
97
- `Setup copied to ${n.length} outlet${n.length === 1 ? "" : "s"}`,
98
- "success"
99
- );
100
- } catch (M) {
101
- (r = v.notify) == null || r.call(
102
- v,
103
- M instanceof Error ? M.message : "Could not clone outlet setup",
104
- "error"
105
- );
106
- } finally {
107
- d.value = !1;
108
- }
109
- }
110
- }
111
- return {
112
- open: s,
113
- query: i,
114
- selected: a,
115
- saving: d,
116
- done: k,
117
- sourceLabel: c,
118
- targets: x,
119
- openModal: $,
120
- close: L,
121
- toggle: m,
122
- confirm: O
123
- };
124
- }
125
- const _ = { class: "am-head" }, ee = { class: "ce-body" }, te = {
126
- class: "ce-hint",
127
- style: { "margin-bottom": "var(--fm-spacing-10)" }
128
- }, se = { class: "sch-search" }, ae = { class: "asg-list" }, le = ["checked", "onChange"], oe = { class: "asg-id" }, ne = { class: "asg-nm" }, ie = {
129
- key: 0,
130
- class: "asg-empty"
131
- }, re = {
132
- key: 1,
133
- class: "cg-done"
134
- }, de = { class: "cg-st-main" }, ue = { class: "am-foot" }, ve = { class: "am-cost-preview" }, ce = { class: "am-foot-btns" }, pe = /* @__PURE__ */ P({
135
- __name: "ScheduleCloneOutletModal",
136
- props: {
137
- modal: {}
138
- },
139
- setup(l) {
140
- return (v, s) => (u(), T(F, {
141
- open: l.modal.open.value,
142
- "panel-class": "ce-modal",
143
- "panel-style": "width: min(460px, 95vw)",
144
- "labelled-by": "schedule-clone-title",
145
- onClose: s[5] || (s[5] = (i) => l.modal.close())
146
- }, {
147
- default: g(() => [
148
- e("div", _, [
149
- s[7] || (s[7] = e("div", {
150
- id: "schedule-clone-title",
151
- class: "am-title"
152
- }, "Clone outlet setup", -1)),
153
- b(C, {
154
- hierarchy: "ghost",
155
- size: "xs",
156
- "icon-only": "",
157
- class: "ce-close-x",
158
- type: "button",
159
- "aria-label": "Close",
160
- onClick: s[0] || (s[0] = (i) => l.modal.close())
161
- }, {
162
- default: g(() => [...s[6] || (s[6] = [
163
- e("svg", {
164
- width: "20",
165
- height: "20",
166
- viewBox: "0 0 20 20",
167
- fill: "none",
168
- stroke: "currentColor",
169
- "stroke-width": "1.8",
170
- "stroke-linecap": "round",
171
- "aria-hidden": "true"
172
- }, [
173
- e("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
174
- ], -1)
175
- ])]),
176
- _: 1
177
- })
178
- ]),
179
- e("div", ee, [
180
- l.modal.done.value === null ? (u(), p(D, { key: 0 }, [
181
- e("div", te, [
182
- s[8] || (s[8] = w(" Copy ", -1)),
183
- e("b", null, y(l.modal.sourceLabel.value), 1),
184
- s[9] || (s[9] = w("'s pay rates to: ", -1))
185
- ]),
186
- e("div", se, [
187
- s[10] || (s[10] = e("svg", {
188
- width: "16",
189
- height: "16",
190
- viewBox: "0 0 16 16",
191
- fill: "none",
192
- "aria-hidden": "true"
193
- }, [
194
- e("circle", {
195
- cx: "7",
196
- cy: "7",
197
- r: "4.5",
198
- stroke: "currentColor",
199
- "stroke-width": "1.5"
200
- }),
201
- e("path", {
202
- d: "M10.5 10.5L14 14",
203
- stroke: "currentColor",
204
- "stroke-width": "1.5",
205
- "stroke-linecap": "round"
206
- })
207
- ], -1)),
208
- S(e("input", {
209
- "onUpdate:modelValue": s[1] || (s[1] = (i) => l.modal.query.value = i),
210
- type: "search",
211
- placeholder: "Search outlets",
212
- "aria-label": "Search outlets",
213
- autocomplete: "off"
214
- }, null, 512), [
215
- [R, l.modal.query.value]
216
- ])
217
- ]),
218
- e("div", ae, [
219
- (u(!0), p(D, null, B(l.modal.targets.value, (i) => (u(), p("label", {
220
- key: i.value,
221
- class: "asg-row"
222
- }, [
223
- e("input", {
224
- type: "checkbox",
225
- class: "sch-checkbox",
226
- "data-platform": "desktop",
227
- checked: l.modal.selected.value.has(i.value),
228
- onChange: (a) => l.modal.toggle(i.value)
229
- }, null, 40, le),
230
- e("span", oe, [
231
- e("span", ne, y(i.label), 1)
232
- ])
233
- ]))), 128)),
234
- l.modal.targets.value.length ? E("", !0) : (u(), p("div", ie, y(l.modal.query.value ? "No outlet matches that search." : "No other outlets."), 1))
235
- ]),
236
- s[11] || (s[11] = e("div", {
237
- class: "ce-hint",
238
- style: { "margin-top": "var(--fm-spacing-10)" }
239
- }, " Copies this outlet's pay rates to the outlets you tick. Their current pay rates are replaced. ", -1))
240
- ], 64)) : (u(), p("div", re, [
241
- s[13] || (s[13] = e("span", {
242
- class: "cg-done-tick",
243
- "aria-hidden": "true"
244
- }, "✓", -1)),
245
- e("div", de, [
246
- s[12] || (s[12] = e("b", null, "Pay rates copied", -1)),
247
- e("small", null, "Sent to " + y(l.modal.done.value) + " outlet" + y(l.modal.done.value === 1 ? "" : "s"), 1)
248
- ])
249
- ]))
250
- ]),
251
- e("div", ue, [
252
- e("div", ve, y(l.modal.done.value === null && l.modal.selected.value.size ? `${l.modal.selected.value.size} outlet${l.modal.selected.value.size === 1 ? "" : "s"} selected` : ""), 1),
253
- e("div", ce, [
254
- l.modal.done.value === null ? (u(), p(D, { key: 0 }, [
255
- b(C, {
256
- hierarchy: "secondary",
257
- size: "sm",
258
- class: "am-btn am-btn-sec",
259
- type: "button",
260
- onClick: s[2] || (s[2] = (i) => l.modal.close())
261
- }, {
262
- default: g(() => [...s[14] || (s[14] = [
263
- w(" Cancel ", -1)
264
- ])]),
265
- _: 1
266
- }),
267
- b(C, {
268
- hierarchy: "primary",
269
- size: "sm",
270
- class: "am-btn am-btn-primary",
271
- type: "button",
272
- disabled: !l.modal.selected.value.size || l.modal.saving.value,
273
- onClick: s[3] || (s[3] = (i) => l.modal.confirm())
274
- }, {
275
- default: g(() => [
276
- w(y(l.modal.saving.value ? "Copying…" : "Copy setup"), 1)
277
- ]),
278
- _: 1
279
- }, 8, ["disabled"])
280
- ], 64)) : (u(), T(C, {
281
- key: 1,
282
- hierarchy: "primary",
283
- size: "sm",
284
- class: "am-btn am-btn-primary",
285
- type: "button",
286
- onClick: s[4] || (s[4] = (i) => l.modal.close())
287
- }, {
288
- default: g(() => [...s[15] || (s[15] = [
289
- w(" Done ", -1)
290
- ])]),
291
- _: 1
292
- }))
293
- ])
294
- ])
295
- ]),
296
- _: 1
297
- }, 8, ["open"]));
298
- }
299
- }), me = { class: "main" }, ye = {
300
- id: "viewSettings",
301
- class: "view"
302
- }, fe = { class: "sp-head" }, he = { class: "outlet-bar" }, be = { class: "sp-body" }, ge = { class: "sp-tabs" }, we = ["onClick"], ke = { class: "sp-content" }, Ce = { class: "sp-panel" }, Se = {
303
- key: 0,
304
- id: "sp-payrates",
305
- class: "sp-sec"
306
- }, Re = { class: "sp-card" }, Oe = { class: "sp-row" }, xe = { class: "sp-field" }, $e = { class: "sp-row" }, Le = { class: "sp-field" }, Me = { class: "sp-row" }, He = { class: "sp-field" }, Ae = { class: "sp-card" }, De = { class: "sp-row" }, Ie = { class: "sp-field" }, Ee = { class: "sp-row" }, Ne = { class: "sp-field" }, Te = {
307
- key: 1,
308
- id: "sp-overtime",
309
- class: "sp-sec"
310
- }, Ue = { class: "sp-card" }, Pe = { class: "sp-row" }, Be = { class: "sp-save-txt" }, Ve = { key: 0 }, Ke = /* @__PURE__ */ P({
311
- __name: "ScheduleGeneralPage",
312
- setup(l) {
313
- const v = f(null);
314
- j(v);
315
- const s = Y(), i = q(), a = X(), d = W(), k = Z(d, {
316
- notify: (n, t) => i.open({ message: n, type: t })
317
- }), c = f(!1);
318
- z(async () => {
319
- await d.resolve() && await J(/* @__PURE__ */ new Date()), await a.load(), a.open();
320
- });
321
- const x = I(
322
- () => d.options.value.length ? d.options.value : [{ value: "", label: "No outlet selected", disabled: !0 }]
323
- );
324
- async function $(n) {
325
- a.dirty.value || await d.switchTo(n, /* @__PURE__ */ new Date()) && (await a.load(), a.open());
326
- }
327
- function L() {
328
- a.close() && s.push({ name: G.SCHEDULE });
329
- }
330
- function m() {
331
- if (!c.value) {
332
- c.value = !0;
333
- return;
334
- }
335
- c.value = !1, a.discard();
336
- }
337
- async function O() {
338
- try {
339
- await a.save(), i.open({ message: "General settings saved", type: "success" });
340
- } catch (n) {
341
- i.open({
342
- message: n instanceof Error ? n.message : "Could not save general settings",
343
- type: "error"
344
- });
345
- }
346
- }
347
- return (n, t) => (u(), p("div", {
348
- ref_key: "rootEl",
349
- ref: v,
350
- class: "sch"
351
- }, [
352
- e("div", me, [
353
- e("div", ye, [
354
- e("div", fe, [
355
- b(C, {
356
- hierarchy: "ghost",
357
- size: "sm",
358
- class: "sp-back",
359
- type: "button",
360
- onClick: L
361
- }, {
362
- default: g(() => [...t[9] || (t[9] = [
363
- e("svg", {
364
- width: "12",
365
- height: "12",
366
- viewBox: "0 0 16 16",
367
- fill: "none",
368
- "aria-hidden": "true"
369
- }, [
370
- e("path", {
371
- d: "M10 3.5L5.5 8l4.5 4.5",
372
- stroke: "currentColor",
373
- "stroke-width": "1.7",
374
- "stroke-linecap": "round",
375
- "stroke-linejoin": "round"
376
- })
377
- ], -1),
378
- e("span", null, "Back to schedule", -1)
379
- ])]),
380
- _: 1
381
- }),
382
- t[12] || (t[12] = e("div", { class: "sp-title" }, "General Settings", -1)),
383
- t[13] || (t[13] = e("div", { class: "sp-sub" }, "Pay multipliers and overtime limit for this outlet.", -1)),
384
- e("div", he, [
385
- t[11] || (t[11] = e("span", { class: "outlet-bar-lbl" }, "Outlet", -1)),
386
- b(K, {
387
- class: "outlet-sel",
388
- "aria-label": "Outlet being configured",
389
- searchable: "",
390
- disabled: o(a).dirty.value || o(a).loading.value,
391
- title: o(a).dirty.value ? "Save or discard changes before switching outlets" : "Which outlet these pay rates apply to",
392
- "model-value": o(d).outletId.value,
393
- options: x.value,
394
- "onUpdate:modelValue": $
395
- }, null, 8, ["disabled", "title", "model-value", "options"]),
396
- b(C, {
397
- hierarchy: "secondary",
398
- size: "sm",
399
- class: "outlet-clone",
400
- type: "button",
401
- disabled: o(a).dirty.value || o(a).loading.value || !o(d).outletId.value,
402
- title: o(a).dirty.value ? "Save or discard changes before cloning" : "Copy this outlet's pay rates to other outlets",
403
- onClick: t[0] || (t[0] = (r) => o(k).openModal())
404
- }, {
405
- default: g(() => [...t[10] || (t[10] = [
406
- e("svg", {
407
- width: "12",
408
- height: "12",
409
- viewBox: "0 0 16 16",
410
- fill: "none",
411
- "aria-hidden": "true"
412
- }, [
413
- e("rect", {
414
- x: "5.5",
415
- y: "5.5",
416
- width: "8.5",
417
- height: "8.5",
418
- rx: "1.5",
419
- stroke: "currentColor",
420
- "stroke-width": "1.4"
421
- }),
422
- e("path", {
423
- d: "M10.5 5.5V3.2A1.6 1.6 0 0 0 8.9 1.6H3.2A1.6 1.6 0 0 0 1.6 3.2v5.7a1.6 1.6 0 0 0 1.6 1.6h2.3",
424
- stroke: "currentColor",
425
- "stroke-width": "1.4",
426
- "stroke-linecap": "round"
427
- })
428
- ], -1),
429
- w(" Clone setup to… ", -1)
430
- ])]),
431
- _: 1
432
- }, 8, ["disabled", "title"])
433
- ])
434
- ]),
435
- e("div", be, [
436
- e("nav", ge, [
437
- (u(!0), p(D, null, B(o(Q), (r) => (u(), p("button", {
438
- key: r.key,
439
- type: "button",
440
- class: U(["sch-tab sp-tab", { active: o(a).activeSection.value === r.key }]),
441
- "data-active": "false",
442
- onClick: (M) => o(a).activeSection.value = r.key
443
- }, y(r.label), 11, we))), 128))
444
- ]),
445
- e("div", ke, [
446
- e("div", Ce, [
447
- o(a).activeSection.value === "payrates" ? (u(), p("section", Se, [
448
- t[26] || (t[26] = e("div", { class: "sp-sec-head" }, [
449
- e("div", { class: "sp-panel-title" }, "Pay rates")
450
- ], -1)),
451
- t[27] || (t[27] = e("div", { class: "sp-panel-desc" }, "Pay multipliers by kind of day.", -1)),
452
- e("div", Re, [
453
- t[20] || (t[20] = e("div", { class: "sp-card-head" }, [
454
- e("div", { class: "sp-card-title" }, "Overtime rate"),
455
- e("div", { class: "sp-card-note" }, "Multiplier on every OT hour")
456
- ], -1)),
457
- e("div", Oe, [
458
- t[15] || (t[15] = e("div", { class: "sp-row-main" }, [
459
- e("div", { class: "sp-row-label" }, "Normal operations day"),
460
- e("div", { class: "sp-row-hint" }, " Multiplier on their rate for hours past the weekly contract. ")
461
- ], -1)),
462
- e("div", xe, [
463
- S(e("input", {
464
- "onUpdate:modelValue": t[1] || (t[1] = (r) => o(a).draft.payRate.NORMAL.overtime = r),
465
- class: "sch-input sp-num",
466
- type: "number",
467
- min: "1",
468
- max: "4",
469
- step: "0.1",
470
- "aria-label": "Overtime rate on a normal day"
471
- }, null, 512), [
472
- [
473
- R,
474
- o(a).draft.payRate.NORMAL.overtime,
475
- void 0,
476
- { number: !0 }
477
- ]
478
- ]),
479
- t[14] || (t[14] = e("span", { class: "sp-unit" }, "×", -1))
480
- ])
481
- ]),
482
- e("div", $e, [
483
- t[17] || (t[17] = e("div", { class: "sp-row-main" }, [
484
- e("div", { class: "sp-row-label" }, "Off day"),
485
- e("div", { class: "sp-row-hint" }, " For a shift on the person's off day, weekly or booked. Check the rate with HR. ")
486
- ], -1)),
487
- e("div", Le, [
488
- S(e("input", {
489
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o(a).draft.payRate.REST_DAY.overtime = r),
490
- class: "sch-input sp-num",
491
- type: "number",
492
- min: "1",
493
- max: "4",
494
- step: "0.1",
495
- "aria-label": "Overtime rate on an off day"
496
- }, null, 512), [
497
- [
498
- R,
499
- o(a).draft.payRate.REST_DAY.overtime,
500
- void 0,
501
- { number: !0 }
502
- ]
503
- ]),
504
- t[16] || (t[16] = e("span", { class: "sp-unit" }, "×", -1))
505
- ])
506
- ]),
507
- e("div", Me, [
508
- t[19] || (t[19] = e("div", { class: "sp-row-main" }, [
509
- e("div", { class: "sp-row-label" }, "Public holiday"),
510
- e("div", { class: "sp-row-hint" }, " For dates on the holiday calendar. Wins over an off day on the same date. ")
511
- ], -1)),
512
- e("div", He, [
513
- S(e("input", {
514
- "onUpdate:modelValue": t[3] || (t[3] = (r) => o(a).draft.payRate.PUBLIC_HOLIDAY.overtime = r),
515
- class: "sch-input sp-num",
516
- type: "number",
517
- min: "1",
518
- max: "4",
519
- step: "0.1",
520
- "aria-label": "Overtime rate on a public holiday"
521
- }, null, 512), [
522
- [
523
- R,
524
- o(a).draft.payRate.PUBLIC_HOLIDAY.overtime,
525
- void 0,
526
- { number: !0 }
527
- ]
528
- ]),
529
- t[18] || (t[18] = e("span", { class: "sp-unit" }, "×", -1))
530
- ])
531
- ])
532
- ]),
533
- e("div", Ae, [
534
- t[25] || (t[25] = e("div", { class: "sp-card-head" }, [
535
- e("div", { class: "sp-card-title" }, "Regular rate"),
536
- e("div", { class: "sp-card-note" }, "Multiplier on ordinary hours")
537
- ], -1)),
538
- e("div", De, [
539
- t[22] || (t[22] = e("div", { class: "sp-row-main" }, [
540
- e("div", { class: "sp-row-label" }, "Off day"),
541
- e("div", { class: "sp-row-hint" }, "Ordinary hours worked on the person's off day.")
542
- ], -1)),
543
- e("div", Ie, [
544
- S(e("input", {
545
- "onUpdate:modelValue": t[4] || (t[4] = (r) => o(a).draft.payRate.REST_DAY.regular = r),
546
- class: "sch-input sp-num",
547
- type: "number",
548
- min: "1",
549
- max: "4",
550
- step: "0.1",
551
- "aria-label": "Regular rate on an off day"
552
- }, null, 512), [
553
- [
554
- R,
555
- o(a).draft.payRate.REST_DAY.regular,
556
- void 0,
557
- { number: !0 }
558
- ]
559
- ]),
560
- t[21] || (t[21] = e("span", { class: "sp-unit" }, "×", -1))
561
- ])
562
- ]),
563
- e("div", Ee, [
564
- t[24] || (t[24] = e("div", { class: "sp-row-main" }, [
565
- e("div", { class: "sp-row-label" }, "Public holiday"),
566
- e("div", { class: "sp-row-hint" }, " Ordinary hours worked on a date on the holiday calendar. ")
567
- ], -1)),
568
- e("div", Ne, [
569
- S(e("input", {
570
- "onUpdate:modelValue": t[5] || (t[5] = (r) => o(a).draft.payRate.PUBLIC_HOLIDAY.regular = r),
571
- class: "sch-input sp-num",
572
- type: "number",
573
- min: "1",
574
- max: "4",
575
- step: "0.1",
576
- "aria-label": "Regular rate on a public holiday"
577
- }, null, 512), [
578
- [
579
- R,
580
- o(a).draft.payRate.PUBLIC_HOLIDAY.regular,
581
- void 0,
582
- { number: !0 }
583
- ]
584
- ]),
585
- t[23] || (t[23] = e("span", { class: "sp-unit" }, "×", -1))
586
- ])
587
- ])
588
- ])
589
- ])) : o(a).activeSection.value === "overtime" ? (u(), p("section", Te, [
590
- t[30] || (t[30] = e("div", { class: "sp-sec-head" }, [
591
- e("div", { class: "sp-panel-title" }, "Overtime")
592
- ], -1)),
593
- t[31] || (t[31] = e("div", { class: "sp-panel-desc" }, "The monthly statutory cap on overtime hours.", -1)),
594
- e("div", Ue, [
595
- t[29] || (t[29] = e("div", { class: "sp-card-head" }, [
596
- e("div", { class: "sp-card-title" }, "Maximum OT Hours"),
597
- e("div", { class: "sp-card-note" }, "Enforced")
598
- ], -1)),
599
- e("div", Pe, [
600
- t[28] || (t[28] = e("div", { class: "sp-row-main" }, [
601
- e("div", { class: "sp-row-label" }, "Monthly OT cap"),
602
- e("div", { class: "sp-row-hint" }, " Hours per person per month. Auto-Schedule never exceeds it. ")
603
- ], -1)),
604
- S(e("input", {
605
- "onUpdate:modelValue": t[6] || (t[6] = (r) => o(a).draft.otCapHours = r),
606
- class: "sch-input sp-num",
607
- type: "number",
608
- min: "0",
609
- max: "300",
610
- step: "1",
611
- "aria-label": "Monthly OT cap in hours"
612
- }, null, 512), [
613
- [
614
- R,
615
- o(a).draft.otCapHours,
616
- void 0,
617
- { number: !0 }
618
- ]
619
- ])
620
- ])
621
- ])
622
- ])) : E("", !0)
623
- ])
624
- ]),
625
- e("div", {
626
- class: U(["sp-save", { dirty: o(a).dirty.value, arming: c.value }])
627
- }, [
628
- e("div", Be, [
629
- w(y(c.value ? "Discard unsaved changes?" : "Unsaved changes") + " ", 1),
630
- c.value ? E("", !0) : (u(), p("span", Ve, "— save or discard before leaving."))
631
- ]),
632
- b(C, {
633
- hierarchy: "secondary",
634
- size: "sm",
635
- class: "am-btn am-btn-sec",
636
- type: "button",
637
- onClick: t[7] || (t[7] = (r) => m())
638
- }, {
639
- default: g(() => [
640
- w(y(c.value ? "Confirm discard" : "Discard"), 1)
641
- ]),
642
- _: 1
643
- }),
644
- b(C, {
645
- hierarchy: "primary",
646
- size: "sm",
647
- class: "am-btn am-btn-primary",
648
- type: "button",
649
- onClick: t[8] || (t[8] = (r) => O())
650
- }, {
651
- default: g(() => [...t[32] || (t[32] = [
652
- w(" Save changes ", -1)
653
- ])]),
654
- _: 1
655
- })
656
- ], 2)
657
- ])
658
- ])
659
- ]),
660
- b(pe, { modal: o(k) }, null, 8, ["modal"])
661
- ], 512));
662
- }
663
- });
664
- export {
665
- Ke as default
666
- };