@feedmepos/mf-hrm-portal 2.3.0-dev → 2.3.0-dev.10

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 (155) hide show
  1. package/dist/{ApprovalCodeList-cG0zmQVJ.js → ApprovalCodeList-BLA2rhLB.js} +5 -5
  2. package/dist/{AuditLogList-BTifJhO1.js → AuditLogList-DBYdZhZl.js} +4 -4
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-qr5TwLTK.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CtCEzPbE.js} +2 -2
  4. package/dist/{EmployeeList-DzcMtxJ3.js → EmployeeList-CA7DWLmy.js} +6 -6
  5. package/dist/{GrantUserList-D5b7tJ8Y.js → GrantUserList-BYnegeEr.js} +6 -6
  6. package/dist/{Main-DFwdAWqn.js → Main-BeXx0hAc.js} +8 -8
  7. package/dist/{Main-B2r59IOW.js → Main-Dh-gZSaa.js} +5 -5
  8. package/dist/{Main-DkLBemi7.js → Main-NDK7LUmm.js} +11 -11
  9. package/dist/{PermissionSetList-B80hrfMW.js → PermissionSetList-DDIacDpQ.js} +7 -7
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ONMn3v_f.js +4167 -0
  11. 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-BVz6q3HE.js} +1 -1
  12. package/dist/{RoleList-DHO4JRKF.js → RoleList-B30FHIzu.js} +9 -9
  13. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRRguWTG.js +492 -0
  14. package/dist/ScheduleGeneralPage-8gEeZbFR.js +776 -0
  15. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-TfxTAjO8.js +2252 -0
  16. package/dist/SchedulePage-DQ0VXWWi.js +17832 -0
  17. package/dist/{SchedulePositionPage-C0hrO11d.js → SchedulePositionPage-oGIDGneA.js} +66 -65
  18. package/dist/{TeamMemberList-CgFWLRBM.js → TeamMemberList-Drj6R4Y3.js} +10 -10
  19. package/dist/{TimesheetList-Dp40G-0I.js → TimesheetList-CDQfN5LE.js} +7 -7
  20. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BFjrMhUG.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Bx-6hjs7.js} +3 -3
  21. package/dist/{app-CmBSTvaI.js → app-DWe_4-ct.js} +678 -594
  22. package/dist/app.js +1 -1
  23. package/dist/{approval-code-C9DmR4Md.js → approval-code-DHsUgc4K.js} +1 -1
  24. package/dist/{dayjs.min-CfL2DQ3d.js → dayjs.min-QSwC9dtX.js} +1 -1
  25. package/dist/{employee-DQcHjoij.js → employee-Bb2b3dP6.js} +29 -28
  26. package/dist/{grant-user-Bv-pJ9Wt.js → grant-user-qzKHFTro.js} +1 -1
  27. package/dist/{iteration-BlavheWG.js → iteration-TDU7bFxZ.js} +1 -1
  28. package/dist/{lodash-QerqayrJ.js → lodash-D3Ns5VMN.js} +1 -1
  29. package/dist/{restaurant-D7PEQjPY.js → restaurant-BbYRA_IT.js} +4 -3
  30. package/dist/{role-RM2YLO7n.js → role-D57Le_-U.js} +2 -2
  31. package/dist/{rule-DjlvYIuP.js → rule-DzesUEX7.js} +3 -3
  32. package/dist/src/api/schedule/index.d.ts +8 -1
  33. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  34. package/dist/src/types/employee.d.ts +1 -0
  35. package/dist/src/types/schedule.d.ts +3 -4
  36. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +0 -8
  37. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +23 -0
  38. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  39. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  40. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +24 -0
  41. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +32 -0
  42. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +25 -0
  43. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  44. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  45. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  46. package/dist/src/views/scheduling/components/{ScheduleOnboardingComplete.vue.d.ts → ScheduleCompletionDialog.vue.d.ts} +8 -3
  47. package/dist/src/views/scheduling/components/{ScheduleShiftCardMenu.vue.d.ts → ScheduleContextMenu.vue.d.ts} +7 -2
  48. package/dist/src/views/scheduling/components/{SchedulePdfPreview.vue.d.ts → ScheduleExportPreview.vue.d.ts} +1 -0
  49. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  50. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  51. package/dist/src/views/scheduling/components/{ScheduleExportDoneDialog.vue.d.ts → ScheduleOnboardingAssignPositionModal.vue.d.ts} +2 -2
  52. package/dist/src/views/scheduling/components/{ScheduleAssignEmployeePopover.vue.d.ts → ScheduleOnboardingClosedDayConfirm.vue.d.ts} +2 -2
  53. package/dist/src/views/scheduling/components/{ScheduleEmployeeMenu.vue.d.ts → ScheduleOnboardingDemandDays.vue.d.ts} +2 -2
  54. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  55. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  56. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  57. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  58. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  59. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  60. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  61. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +17 -1
  62. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  63. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +2 -2
  64. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +4 -4
  65. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +2 -12
  66. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +3 -3
  67. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +1 -1
  68. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +13 -0
  69. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +12 -8
  70. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +5 -1
  71. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +7 -1
  72. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +7 -0
  73. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +19 -0
  74. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +1 -3
  75. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +11 -0
  76. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  77. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  78. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +1 -4
  79. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +15 -0
  80. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +34 -21
  81. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -13
  82. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +2 -8
  83. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  84. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +3 -0
  85. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +50 -11
  86. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +3 -1
  87. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +6 -1
  88. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +1 -2
  89. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -3
  90. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +7 -24
  91. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +19 -5
  92. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +16 -0
  93. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  94. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +27 -0
  95. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  96. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  97. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +9 -0
  98. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +6 -3
  99. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +29 -0
  100. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +20 -0
  101. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +19 -11
  102. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +5 -6
  103. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  104. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  105. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +205 -0
  106. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  107. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  108. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +306 -529
  109. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  110. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  111. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +18 -0
  112. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  113. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +10 -7
  114. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  115. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +4 -1
  116. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +4 -2
  117. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +9 -1
  118. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  119. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +30 -4
  120. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +8 -25
  121. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +18 -3
  122. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  123. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  124. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +25 -8
  125. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +4 -1
  126. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +6 -4
  127. package/dist/src/views/scheduling/country-rules/index.d.ts +24 -0
  128. package/dist/src/views/scheduling/data.d.ts +16 -7
  129. package/dist/src/views/scheduling/locales/index.d.ts +80 -0
  130. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  131. package/dist/src/views/scheduling/schedule-state.d.ts +104 -16
  132. package/dist/src/views/scheduling/schedule-store.d.ts +17 -6
  133. package/dist/src/views/scheduling/types.d.ts +27 -5
  134. package/dist/style.css +1 -1
  135. package/dist/tsconfig.app.tsbuildinfo +1 -1
  136. package/dist/{useAppStore-d_nHyK5u.js → useAppStore-BoLkvkE2.js} +1 -1
  137. package/dist/{useLoading-JFoghhRz.js → useLoading-Ch1AUYT1.js} +1 -1
  138. package/dist/{useReportPermissions-Bl6Br79r.js → useReportPermissions-Cmuead1K.js} +3 -3
  139. package/package.json +2 -1
  140. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DjNcJQM9.js +0 -4167
  141. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B-XtB64L.js +0 -452
  142. package/dist/ScheduleGeneralPage-WlBM8bxV.js +0 -629
  143. package/dist/SchedulePage-Nm0krGVU.js +0 -17056
  144. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js +0 -1150
  145. package/dist/src/components/layout/withShell.d.ts +0 -14
  146. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +0 -22
  147. package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +0 -14
  148. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +0 -14
  149. package/dist/src/views/scheduling/components/ScheduleTourAllSet.vue.d.ts +0 -6
  150. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +0 -77
  151. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +0 -122
  152. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +0 -23
  153. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +0 -17
  154. package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +0 -10
  155. /package/dist/src/{components/layout/AppSidebar.vue.d.ts → views/scheduling/components/SchedulePublishShareArt.vue.d.ts} +0 -0
@@ -1,629 +0,0 @@
1
- import { ref as m, reactive as E, computed as T, defineComponent as I, createElementBlock as u, createCommentVNode as L, openBlock as d, withModifiers as H, createElementVNode as e, createVNode as f, withCtx as g, Fragment as M, createTextVNode as b, toDisplayString as c, withDirectives as k, vModelText as S, renderList as A, createBlock as U, onMounted as P, unref as i, normalizeClass as D } from "vue";
2
- import { useRouter as V } from "vue-router";
3
- import { R as z } from "./app-CmBSTvaI.js";
4
- import { b as n, w as x, x as B, a4 as w, a6 as F, a7 as J, T as Y, a5 as q } from "./ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js";
5
- import "./iteration-BlavheWG.js";
6
- import "@feedmepos/mf-common";
7
- import "./employee-DQcHjoij.js";
8
- const j = [
9
- { key: "payrates", label: "Pay rates" },
10
- { key: "overtime", label: "Overtime" }
11
- ];
12
- function N() {
13
- return JSON.parse(
14
- JSON.stringify({
15
- salesForecast: n.salesForecast,
16
- labourTarget: n.labourTarget,
17
- budgetFromSales: n.budgetFromSales,
18
- budget: n.budget,
19
- payRate: n.payRate,
20
- otCapHours: n.otCapHours,
21
- otBudget: n.otBudget,
22
- notify: n.notify
23
- })
24
- );
25
- }
26
- function G() {
27
- const l = m(!1), p = m("payrates"), a = E(N()), s = m(!1);
28
- async function r() {
29
- if (x.value) {
30
- s.value = !0;
31
- try {
32
- const y = await B.getSettings(x.value);
33
- n.payRate = JSON.parse(JSON.stringify(y.payRate));
34
- } finally {
35
- s.value = !1;
36
- }
37
- }
38
- }
39
- function h(y) {
40
- Object.assign(a, N()), p.value = y ?? "payrates", l.value = !0;
41
- }
42
- const v = T(() => JSON.stringify(a) !== JSON.stringify(N()));
43
- function C() {
44
- return v.value ? !1 : (l.value = !1, !0);
45
- }
46
- function O() {
47
- Object.assign(a, N()), l.value = !1;
48
- }
49
- async function R() {
50
- if (!x.value) throw new Error("No outlet selected");
51
- const y = await B.saveSettings(x.value, { payRate: a.payRate });
52
- n.salesForecast = a.salesForecast, n.labourTarget = a.labourTarget, n.budgetFromSales = a.budgetFromSales, n.budget = a.budget, n.payRate = JSON.parse(JSON.stringify(y.payRate)), n.otCapHours = a.otCapHours, n.otBudget = a.otBudget, n.notify = JSON.parse(JSON.stringify(a.notify)), l.value = !1;
53
- }
54
- return { isOpen: l, activeSection: p, draft: a, dirty: v, loading: s, load: r, open: h, close: C, discard: O, save: R };
55
- }
56
- function W(l) {
57
- const p = m(!1), a = m(""), s = m(/* @__PURE__ */ new Set()), r = m(!1), h = m(null), v = T(
58
- () => {
59
- var t;
60
- return ((t = l.options.value.find((o) => o.value === l.outletId.value)) == null ? void 0 : t.label) ?? "";
61
- }
62
- ), C = T(() => {
63
- const t = a.value.trim().toLowerCase();
64
- return l.options.value.filter(
65
- (o) => o.value !== l.outletId.value && (!t || o.label.toLowerCase().includes(t))
66
- );
67
- });
68
- function O() {
69
- a.value = "", s.value = /* @__PURE__ */ new Set(), r.value = !1, h.value = null, p.value = !0;
70
- }
71
- function R() {
72
- p.value = !1;
73
- }
74
- function y(t) {
75
- const o = new Set(s.value);
76
- o.has(t) ? o.delete(t) : o.add(t), s.value = o;
77
- }
78
- async function $() {
79
- const t = [...s.value];
80
- if (!(!t.length || r.value)) {
81
- r.value = !0;
82
- try {
83
- await Promise.all(t.map((o) => B.saveSettings(o, { payRate: n.payRate }))), h.value = t.length;
84
- } finally {
85
- r.value = !1;
86
- }
87
- }
88
- }
89
- return {
90
- open: p,
91
- query: a,
92
- selected: s,
93
- saving: r,
94
- done: h,
95
- sourceLabel: v,
96
- targets: C,
97
- openModal: O,
98
- close: R,
99
- toggle: y,
100
- confirm: $
101
- };
102
- }
103
- const K = {
104
- class: "ce-modal",
105
- style: { width: "min(460px, 95vw)" }
106
- }, Q = { class: "am-head" }, X = { class: "ce-body" }, Z = {
107
- class: "ce-hint",
108
- style: { "margin-bottom": "var(--fm-spacing-10)" }
109
- }, _ = { class: "sch-search" }, ee = { class: "asg-list" }, te = ["checked", "onChange"], se = { class: "asg-id" }, ae = { class: "asg-nm" }, le = {
110
- key: 0,
111
- class: "asg-empty"
112
- }, oe = {
113
- key: 1,
114
- class: "cg-done"
115
- }, ie = { class: "cg-st-main" }, ne = { class: "am-foot" }, re = { class: "am-cost-preview" }, de = { class: "am-foot-btns" }, ue = /* @__PURE__ */ I({
116
- __name: "ScheduleCloneOutletModal",
117
- props: {
118
- modal: {}
119
- },
120
- setup(l) {
121
- return (p, a) => l.modal.open.value ? (d(), u("div", {
122
- key: 0,
123
- class: "modal-overlay open",
124
- onClick: a[5] || (a[5] = H((s) => l.modal.close(), ["self"]))
125
- }, [
126
- e("div", K, [
127
- e("div", Q, [
128
- a[7] || (a[7] = e("div", { class: "am-title" }, "Clone outlet setup", -1)),
129
- f(w, {
130
- hierarchy: "ghost",
131
- size: "xs",
132
- "icon-only": "",
133
- class: "ce-close-x",
134
- type: "button",
135
- "aria-label": "Close",
136
- onClick: a[0] || (a[0] = (s) => l.modal.close())
137
- }, {
138
- default: g(() => [...a[6] || (a[6] = [
139
- e("svg", {
140
- width: "20",
141
- height: "20",
142
- viewBox: "0 0 20 20",
143
- fill: "none",
144
- stroke: "currentColor",
145
- "stroke-width": "1.8",
146
- "stroke-linecap": "round",
147
- "aria-hidden": "true"
148
- }, [
149
- e("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
150
- ], -1)
151
- ])]),
152
- _: 1
153
- })
154
- ]),
155
- e("div", X, [
156
- l.modal.done.value === null ? (d(), u(M, { key: 0 }, [
157
- e("div", Z, [
158
- a[8] || (a[8] = b(" Copy ", -1)),
159
- e("b", null, c(l.modal.sourceLabel.value), 1),
160
- a[9] || (a[9] = b("'s pay rates to: ", -1))
161
- ]),
162
- e("div", _, [
163
- a[10] || (a[10] = e("svg", {
164
- width: "16",
165
- height: "16",
166
- viewBox: "0 0 16 16",
167
- fill: "none",
168
- "aria-hidden": "true"
169
- }, [
170
- e("circle", {
171
- cx: "7",
172
- cy: "7",
173
- r: "4.5",
174
- stroke: "currentColor",
175
- "stroke-width": "1.5"
176
- }),
177
- e("path", {
178
- d: "M10.5 10.5L14 14",
179
- stroke: "currentColor",
180
- "stroke-width": "1.5",
181
- "stroke-linecap": "round"
182
- })
183
- ], -1)),
184
- k(e("input", {
185
- "onUpdate:modelValue": a[1] || (a[1] = (s) => l.modal.query.value = s),
186
- type: "search",
187
- placeholder: "Search outlets",
188
- "aria-label": "Search outlets",
189
- autocomplete: "off"
190
- }, null, 512), [
191
- [S, l.modal.query.value]
192
- ])
193
- ]),
194
- e("div", ee, [
195
- (d(!0), u(M, null, A(l.modal.targets.value, (s) => (d(), u("label", {
196
- key: s.value,
197
- class: "asg-row"
198
- }, [
199
- e("input", {
200
- type: "checkbox",
201
- class: "sch-checkbox",
202
- "data-platform": "desktop",
203
- checked: l.modal.selected.value.has(s.value),
204
- onChange: (r) => l.modal.toggle(s.value)
205
- }, null, 40, te),
206
- e("span", se, [
207
- e("span", ae, c(s.label), 1)
208
- ])
209
- ]))), 128)),
210
- l.modal.targets.value.length ? L("", !0) : (d(), u("div", le, c(l.modal.query.value ? "No outlet matches that search." : "No other outlets."), 1))
211
- ]),
212
- a[11] || (a[11] = e("div", {
213
- class: "ce-hint",
214
- style: { "margin-top": "var(--fm-spacing-10)" }
215
- }, " Copies this outlet's pay rates to the outlets you tick. Their current pay rates are replaced. ", -1))
216
- ], 64)) : (d(), u("div", oe, [
217
- a[13] || (a[13] = e("span", {
218
- class: "cg-done-tick",
219
- "aria-hidden": "true"
220
- }, "✓", -1)),
221
- e("div", ie, [
222
- a[12] || (a[12] = e("b", null, "Pay rates copied", -1)),
223
- e("small", null, "Sent to " + c(l.modal.done.value) + " outlet" + c(l.modal.done.value === 1 ? "" : "s"), 1)
224
- ])
225
- ]))
226
- ]),
227
- e("div", ne, [
228
- e("div", re, c(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),
229
- e("div", de, [
230
- l.modal.done.value === null ? (d(), u(M, { key: 0 }, [
231
- f(w, {
232
- hierarchy: "secondary",
233
- size: "sm",
234
- class: "am-btn am-btn-sec",
235
- type: "button",
236
- onClick: a[2] || (a[2] = (s) => l.modal.close())
237
- }, {
238
- default: g(() => [...a[14] || (a[14] = [
239
- b(" Cancel ", -1)
240
- ])]),
241
- _: 1
242
- }),
243
- f(w, {
244
- hierarchy: "primary",
245
- size: "sm",
246
- class: "am-btn am-btn-primary",
247
- type: "button",
248
- disabled: !l.modal.selected.value.size || l.modal.saving.value,
249
- onClick: a[3] || (a[3] = (s) => l.modal.confirm())
250
- }, {
251
- default: g(() => [
252
- b(c(l.modal.saving.value ? "Copying…" : "Copy setup"), 1)
253
- ]),
254
- _: 1
255
- }, 8, ["disabled"])
256
- ], 64)) : (d(), U(w, {
257
- key: 1,
258
- hierarchy: "primary",
259
- size: "sm",
260
- class: "am-btn am-btn-primary",
261
- type: "button",
262
- onClick: a[4] || (a[4] = (s) => l.modal.close())
263
- }, {
264
- default: g(() => [...a[15] || (a[15] = [
265
- b(" Done ", -1)
266
- ])]),
267
- _: 1
268
- }))
269
- ])
270
- ])
271
- ])
272
- ])) : L("", !0);
273
- }
274
- }), ve = { class: "main" }, pe = {
275
- id: "viewSettings",
276
- class: "view"
277
- }, ce = { class: "sp-head" }, me = { class: "outlet-bar" }, ye = { class: "sp-body" }, fe = { class: "sp-tabs" }, be = ["onClick"], he = { class: "sp-content" }, ge = { class: "sp-panel" }, we = {
278
- key: 0,
279
- id: "sp-payrates",
280
- class: "sp-sec"
281
- }, ke = { class: "sp-card" }, Se = { class: "sp-row" }, Ce = { class: "sp-field" }, Oe = { class: "sp-row" }, Re = { class: "sp-field" }, $e = { class: "sp-row" }, xe = { class: "sp-field" }, Ne = { class: "sp-card" }, Me = { class: "sp-row" }, Te = { class: "sp-field" }, Le = { class: "sp-row" }, Be = { class: "sp-field" }, De = {
282
- key: 1,
283
- id: "sp-overtime",
284
- class: "sp-sec"
285
- }, Ie = { class: "sp-card" }, Ae = { class: "sp-row" }, Ee = { class: "sp-save-txt" }, He = { key: 0 }, je = /* @__PURE__ */ I({
286
- __name: "ScheduleGeneralPage",
287
- setup(l) {
288
- const p = m(null);
289
- F(p);
290
- const a = V(), s = G(), r = J(), h = W(r), v = m(!1);
291
- P(async () => {
292
- await r.resolve() && await Y(/* @__PURE__ */ new Date()), await s.load(), s.open();
293
- });
294
- const C = T(
295
- () => r.options.value.length ? r.options.value : [{ value: "", label: "No outlet selected", disabled: !0 }]
296
- );
297
- async function O($) {
298
- s.dirty.value || await r.switchTo($, /* @__PURE__ */ new Date()) && (await s.load(), s.open());
299
- }
300
- function R() {
301
- s.close() && a.push({ name: z.SCHEDULE });
302
- }
303
- function y() {
304
- if (!v.value) {
305
- v.value = !0;
306
- return;
307
- }
308
- v.value = !1, s.discard();
309
- }
310
- return ($, t) => (d(), u("div", {
311
- ref_key: "rootEl",
312
- ref: p,
313
- class: "sch"
314
- }, [
315
- e("div", ve, [
316
- e("div", pe, [
317
- e("div", ce, [
318
- f(w, {
319
- hierarchy: "ghost",
320
- size: "sm",
321
- class: "sp-back",
322
- type: "button",
323
- onClick: R
324
- }, {
325
- default: g(() => [...t[9] || (t[9] = [
326
- e("svg", {
327
- width: "12",
328
- height: "12",
329
- viewBox: "0 0 16 16",
330
- fill: "none",
331
- "aria-hidden": "true"
332
- }, [
333
- e("path", {
334
- d: "M10 3.5L5.5 8l4.5 4.5",
335
- stroke: "currentColor",
336
- "stroke-width": "1.7",
337
- "stroke-linecap": "round",
338
- "stroke-linejoin": "round"
339
- })
340
- ], -1),
341
- e("span", null, "Back to schedule", -1)
342
- ])]),
343
- _: 1
344
- }),
345
- t[12] || (t[12] = e("div", { class: "sp-title" }, "General Settings", -1)),
346
- t[13] || (t[13] = e("div", { class: "sp-sub" }, "Pay multipliers for this outlet.", -1)),
347
- e("div", me, [
348
- t[11] || (t[11] = e("span", { class: "outlet-bar-lbl" }, "Outlet", -1)),
349
- f(q, {
350
- class: "outlet-sel",
351
- "aria-label": "Outlet being configured",
352
- searchable: "",
353
- disabled: i(s).dirty.value || i(s).loading.value,
354
- title: i(s).dirty.value ? "Save or discard changes before switching outlets" : "Which outlet these pay rates apply to",
355
- "model-value": i(r).outletId.value,
356
- options: C.value,
357
- "onUpdate:modelValue": O
358
- }, null, 8, ["disabled", "title", "model-value", "options"]),
359
- f(w, {
360
- hierarchy: "secondary",
361
- size: "sm",
362
- class: "outlet-clone",
363
- type: "button",
364
- disabled: i(s).dirty.value || i(s).loading.value || !i(r).outletId.value,
365
- title: i(s).dirty.value ? "Save or discard changes before cloning" : "Copy this outlet's pay rates to other outlets",
366
- onClick: t[0] || (t[0] = (o) => i(h).openModal())
367
- }, {
368
- default: g(() => [...t[10] || (t[10] = [
369
- e("svg", {
370
- width: "12",
371
- height: "12",
372
- viewBox: "0 0 16 16",
373
- fill: "none",
374
- "aria-hidden": "true"
375
- }, [
376
- e("rect", {
377
- x: "5.5",
378
- y: "5.5",
379
- width: "8.5",
380
- height: "8.5",
381
- rx: "1.5",
382
- stroke: "currentColor",
383
- "stroke-width": "1.4"
384
- }),
385
- e("path", {
386
- 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",
387
- stroke: "currentColor",
388
- "stroke-width": "1.4",
389
- "stroke-linecap": "round"
390
- })
391
- ], -1),
392
- b(" Clone setup to… ", -1)
393
- ])]),
394
- _: 1
395
- }, 8, ["disabled", "title"])
396
- ])
397
- ]),
398
- e("div", ye, [
399
- e("nav", fe, [
400
- (d(!0), u(M, null, A(i(j), (o) => (d(), u("button", {
401
- key: o.key,
402
- type: "button",
403
- class: D(["sch-tab sp-tab", { active: i(s).activeSection.value === o.key }]),
404
- "data-active": "false",
405
- onClick: (Ue) => i(s).activeSection.value = o.key
406
- }, c(o.label), 11, be))), 128))
407
- ]),
408
- e("div", he, [
409
- e("div", ge, [
410
- i(s).activeSection.value === "payrates" ? (d(), u("section", we, [
411
- t[26] || (t[26] = e("div", { class: "sp-sec-head" }, [
412
- e("div", { class: "sp-panel-title" }, "Pay rates")
413
- ], -1)),
414
- t[27] || (t[27] = e("div", { class: "sp-panel-desc" }, "Pay multipliers by kind of day.", -1)),
415
- e("div", ke, [
416
- t[20] || (t[20] = e("div", { class: "sp-card-head" }, [
417
- e("div", { class: "sp-card-title" }, "Overtime rate"),
418
- e("div", { class: "sp-card-note" }, "Multiplier on every OT hour")
419
- ], -1)),
420
- e("div", Se, [
421
- t[15] || (t[15] = e("div", { class: "sp-row-main" }, [
422
- e("div", { class: "sp-row-label" }, "Normal operations day"),
423
- e("div", { class: "sp-row-hint" }, " Multiplier on their rate for hours past the weekly contract. ")
424
- ], -1)),
425
- e("div", Ce, [
426
- k(e("input", {
427
- "onUpdate:modelValue": t[1] || (t[1] = (o) => i(s).draft.payRate.NORMAL.overtime = o),
428
- class: "sch-input sp-num",
429
- type: "number",
430
- min: "1",
431
- max: "4",
432
- step: "0.1",
433
- "aria-label": "Overtime rate on a normal day"
434
- }, null, 512), [
435
- [
436
- S,
437
- i(s).draft.payRate.NORMAL.overtime,
438
- void 0,
439
- { number: !0 }
440
- ]
441
- ]),
442
- t[14] || (t[14] = e("span", { class: "sp-unit" }, "×", -1))
443
- ])
444
- ]),
445
- e("div", Oe, [
446
- t[17] || (t[17] = e("div", { class: "sp-row-main" }, [
447
- e("div", { class: "sp-row-label" }, "Off day"),
448
- e("div", { class: "sp-row-hint" }, " For a shift on the person's off day, weekly or booked. Check the rate with HR. ")
449
- ], -1)),
450
- e("div", Re, [
451
- k(e("input", {
452
- "onUpdate:modelValue": t[2] || (t[2] = (o) => i(s).draft.payRate.REST_DAY.overtime = o),
453
- class: "sch-input sp-num",
454
- type: "number",
455
- min: "1",
456
- max: "4",
457
- step: "0.1",
458
- "aria-label": "Overtime rate on an off day"
459
- }, null, 512), [
460
- [
461
- S,
462
- i(s).draft.payRate.REST_DAY.overtime,
463
- void 0,
464
- { number: !0 }
465
- ]
466
- ]),
467
- t[16] || (t[16] = e("span", { class: "sp-unit" }, "×", -1))
468
- ])
469
- ]),
470
- e("div", $e, [
471
- t[19] || (t[19] = e("div", { class: "sp-row-main" }, [
472
- e("div", { class: "sp-row-label" }, "Public holiday"),
473
- e("div", { class: "sp-row-hint" }, " For dates on the holiday calendar. Wins over an off day on the same date. ")
474
- ], -1)),
475
- e("div", xe, [
476
- k(e("input", {
477
- "onUpdate:modelValue": t[3] || (t[3] = (o) => i(s).draft.payRate.PUBLIC_HOLIDAY.overtime = o),
478
- class: "sch-input sp-num",
479
- type: "number",
480
- min: "1",
481
- max: "4",
482
- step: "0.1",
483
- "aria-label": "Overtime rate on a public holiday"
484
- }, null, 512), [
485
- [
486
- S,
487
- i(s).draft.payRate.PUBLIC_HOLIDAY.overtime,
488
- void 0,
489
- { number: !0 }
490
- ]
491
- ]),
492
- t[18] || (t[18] = e("span", { class: "sp-unit" }, "×", -1))
493
- ])
494
- ])
495
- ]),
496
- e("div", Ne, [
497
- t[25] || (t[25] = e("div", { class: "sp-card-head" }, [
498
- e("div", { class: "sp-card-title" }, "Regular rate"),
499
- e("div", { class: "sp-card-note" }, "Multiplier on ordinary hours")
500
- ], -1)),
501
- e("div", Me, [
502
- t[22] || (t[22] = e("div", { class: "sp-row-main" }, [
503
- e("div", { class: "sp-row-label" }, "Off day"),
504
- e("div", { class: "sp-row-hint" }, "Ordinary hours worked on the person's off day.")
505
- ], -1)),
506
- e("div", Te, [
507
- k(e("input", {
508
- "onUpdate:modelValue": t[4] || (t[4] = (o) => i(s).draft.payRate.REST_DAY.regular = o),
509
- class: "sch-input sp-num",
510
- type: "number",
511
- min: "1",
512
- max: "4",
513
- step: "0.1",
514
- "aria-label": "Regular rate on an off day"
515
- }, null, 512), [
516
- [
517
- S,
518
- i(s).draft.payRate.REST_DAY.regular,
519
- void 0,
520
- { number: !0 }
521
- ]
522
- ]),
523
- t[21] || (t[21] = e("span", { class: "sp-unit" }, "×", -1))
524
- ])
525
- ]),
526
- e("div", Le, [
527
- t[24] || (t[24] = e("div", { class: "sp-row-main" }, [
528
- e("div", { class: "sp-row-label" }, "Public holiday"),
529
- e("div", { class: "sp-row-hint" }, " Ordinary hours worked on a date on the holiday calendar. ")
530
- ], -1)),
531
- e("div", Be, [
532
- k(e("input", {
533
- "onUpdate:modelValue": t[5] || (t[5] = (o) => i(s).draft.payRate.PUBLIC_HOLIDAY.regular = o),
534
- class: "sch-input sp-num",
535
- type: "number",
536
- min: "1",
537
- max: "4",
538
- step: "0.1",
539
- "aria-label": "Regular rate on a public holiday"
540
- }, null, 512), [
541
- [
542
- S,
543
- i(s).draft.payRate.PUBLIC_HOLIDAY.regular,
544
- void 0,
545
- { number: !0 }
546
- ]
547
- ]),
548
- t[23] || (t[23] = e("span", { class: "sp-unit" }, "×", -1))
549
- ])
550
- ])
551
- ])
552
- ])) : i(s).activeSection.value === "overtime" ? (d(), u("section", De, [
553
- t[30] || (t[30] = e("div", { class: "sp-sec-head" }, [
554
- e("div", { class: "sp-panel-title" }, "Overtime")
555
- ], -1)),
556
- t[31] || (t[31] = e("div", { class: "sp-panel-desc" }, "The monthly statutory cap on overtime hours.", -1)),
557
- e("div", Ie, [
558
- t[29] || (t[29] = e("div", { class: "sp-card-head" }, [
559
- e("div", { class: "sp-card-title" }, "Maximum OT Hours"),
560
- e("div", { class: "sp-card-note" }, "Enforced")
561
- ], -1)),
562
- e("div", Ae, [
563
- t[28] || (t[28] = e("div", { class: "sp-row-main" }, [
564
- e("div", { class: "sp-row-label" }, "Monthly OT cap"),
565
- e("div", { class: "sp-row-hint" }, " Hours per person per month. Auto-Schedule never exceeds it. ")
566
- ], -1)),
567
- k(e("input", {
568
- "onUpdate:modelValue": t[6] || (t[6] = (o) => i(s).draft.otCapHours = o),
569
- class: "sch-input sp-num",
570
- type: "number",
571
- min: "0",
572
- max: "300",
573
- step: "1",
574
- "aria-label": "Monthly OT cap in hours"
575
- }, null, 512), [
576
- [
577
- S,
578
- i(s).draft.otCapHours,
579
- void 0,
580
- { number: !0 }
581
- ]
582
- ])
583
- ])
584
- ])
585
- ])) : L("", !0)
586
- ])
587
- ]),
588
- e("div", {
589
- class: D(["sp-save", { dirty: i(s).dirty.value, arming: v.value }])
590
- }, [
591
- e("div", Ee, [
592
- b(c(v.value ? "Discard unsaved changes?" : "Unsaved changes") + " ", 1),
593
- v.value ? L("", !0) : (d(), u("span", He, "— save or discard before leaving."))
594
- ]),
595
- f(w, {
596
- hierarchy: "secondary",
597
- size: "sm",
598
- class: "am-btn am-btn-sec",
599
- type: "button",
600
- onClick: t[7] || (t[7] = (o) => y())
601
- }, {
602
- default: g(() => [
603
- b(c(v.value ? "Confirm discard" : "Discard"), 1)
604
- ]),
605
- _: 1
606
- }),
607
- f(w, {
608
- hierarchy: "primary",
609
- size: "sm",
610
- class: "am-btn am-btn-primary",
611
- type: "button",
612
- onClick: t[8] || (t[8] = (o) => i(s).save())
613
- }, {
614
- default: g(() => [...t[32] || (t[32] = [
615
- b(" Save changes ", -1)
616
- ])]),
617
- _: 1
618
- })
619
- ], 2)
620
- ])
621
- ])
622
- ]),
623
- f(ue, { modal: i(h) }, null, 8, ["modal"])
624
- ], 512));
625
- }
626
- });
627
- export {
628
- je as default
629
- };