@feedmepos/mf-hrm-portal 2.2.5-dev.8 → 2.2.5-dev.9
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-BzL73nqc.js → ApprovalCodeList-D5l9vIsE.js} +2 -2
- package/dist/{AuditLogList-BEZoHLsX.js → AuditLogList-ByTa5UJY.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DDrP7ywR.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js} +2 -2
- package/dist/{EmployeeList-s4FYw1ZF.js → EmployeeList-Bv6ANk-P.js} +8 -9
- package/dist/{GrantUserList-Ci_ElhHZ.js → GrantUserList-Bt8w3p4j.js} +3 -3
- package/dist/{Main-BojQuzZI.js → Main-DHJcgePj.js} +5 -5
- package/dist/{Main-N1CNGDAy.js → Main-DkP8dWgn.js} +9 -9
- package/dist/{Main-CKr3RGvf.js → Main-DqiGpT4v.js} +2 -2
- package/dist/{PermissionSetList-DLknSOzA.js → PermissionSetList-BIGv1u67.js} +10 -11
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DK2Bx8Aw.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js} +892 -893
- package/dist/{RoleList-Cm7_q5l9.js → RoleList-CH6NDKPU.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DrJ1vA88.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js} +39 -39
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js +690 -0
- package/dist/{ScheduleGeneralPage-CmR4BZAp.js → ScheduleGeneralPage-DJPENJZ2.js} +96 -99
- package/dist/SchedulePage-C1egcbIC.js +14421 -0
- package/dist/{SchedulePositionPage-Bv3zraaF.js → SchedulePositionPage-OhL_hsqG.js} +10 -10
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
- package/dist/{TeamMemberList-D2OfkfJP.js → TeamMemberList-BwfG3go2.js} +8 -9
- package/dist/{TimesheetList-DEdLpYuM.js → TimesheetList-DcoqzbLO.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BfMkNvCz.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js} +2 -2
- package/dist/{app-Dmmpy4k-.js → app-BcZ6C8M8.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DcfKURXN.js → dayjs.min-Ch0iysTG.js} +1 -1
- package/dist/employee-DwYHFacQ.js +204 -0
- package/dist/{index-BxkisKEs.js → iteration-D1uWLp0V.js} +726 -698
- package/dist/{lodash-p40sRkqQ.js → lodash-DErxm7xf.js} +1 -1
- package/dist/{role-CM1urkJZ.js → role-B9VanAny.js} +3 -4
- package/dist/{rule-BPApyMJY.js → rule-C4f_Ilzr.js} +36 -37
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +5 -1
- package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +18 -2
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +4 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +4 -0
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +2 -2
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +4 -0
- package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +10 -11
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +5 -3
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +7 -1
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +11 -2
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +1 -0
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +4 -1
- package/dist/src/views/scheduling/schedule-store.d.ts +25 -0
- package/dist/src/views/scheduling/types.d.ts +5 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-5EhPvVT9.js → useReportPermissions-CTr56kBo.js} +3 -3
- package/package.json +1 -1
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-DX5JR7bi.js +0 -600
- package/dist/SchedulePage-CN3ZsQ9E.js +0 -13905
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-Buu8NEQf.js +0 -221
- package/dist/employee-D3ZpYH4j.js +0 -139
- package/dist/index-D-VlxJu9.js +0 -70
- package/dist/iteration-CcXrOMQe.js +0 -30
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { defineStore as x, storeToRefs as b } from "pinia";
|
|
2
2
|
import { ref as w } from "vue";
|
|
3
3
|
import { useCoreStore as B } from "@feedmepos/mf-common";
|
|
4
|
-
import "./
|
|
4
|
+
import { s as v } from "./iteration-D1uWLp0V.js";
|
|
5
5
|
import { g as f, b as p, u as I } from "./restaurant-BTpBmfBV.js";
|
|
6
|
-
import { s as v } from "./iteration-CcXrOMQe.js";
|
|
7
6
|
const R = {
|
|
8
7
|
async readRoles() {
|
|
9
8
|
return f(await p().get("/pos-roles"));
|
|
@@ -81,7 +80,7 @@ const A = x("role", () => {
|
|
|
81
80
|
updateRole: g,
|
|
82
81
|
deleteRole: S
|
|
83
82
|
};
|
|
84
|
-
}),
|
|
83
|
+
}), L = () => {
|
|
85
84
|
const e = A();
|
|
86
85
|
return {
|
|
87
86
|
...e,
|
|
@@ -89,5 +88,5 @@ const A = x("role", () => {
|
|
|
89
88
|
};
|
|
90
89
|
};
|
|
91
90
|
export {
|
|
92
|
-
|
|
91
|
+
L as u
|
|
93
92
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { e as y } from "./
|
|
2
|
-
import { e as O, b as
|
|
3
|
-
import { s as V, c as ee } from "./iteration-CcXrOMQe.js";
|
|
1
|
+
import { s as W, c as q, e as y } from "./iteration-D1uWLp0V.js";
|
|
2
|
+
import { e as O, b as V, c as _, v as F, n as h, O as ee, D as M } from "./app-BcZ6C8M8.js";
|
|
4
3
|
import { s as se } from "./utils-BZkjJbju.js";
|
|
5
4
|
import { g, b as v, q as x, u as te } from "./restaurant-BTpBmfBV.js";
|
|
6
5
|
import { defineStore as z, storeToRefs as K } from "pinia";
|
|
@@ -180,13 +179,13 @@ function H(e, s, r = /* @__PURE__ */ new Set()) {
|
|
|
180
179
|
}
|
|
181
180
|
return n;
|
|
182
181
|
}
|
|
183
|
-
function
|
|
182
|
+
function Ae(e) {
|
|
184
183
|
const s = Q(e).map(
|
|
185
184
|
({ setNames: i, setId: t, ...a }) => a
|
|
186
185
|
), r = s.filter((i) => !i.inverted), n = s.filter((i) => i.inverted);
|
|
187
186
|
return L(r, n);
|
|
188
187
|
}
|
|
189
|
-
function
|
|
188
|
+
function Oe(e, s, r) {
|
|
190
189
|
const n = /* @__PURE__ */ new Map();
|
|
191
190
|
return e.forEach(
|
|
192
191
|
({ name: i, permissions: t }) => t.forEach(({ conditions: a, actions: o }) => {
|
|
@@ -203,7 +202,7 @@ function _e(e, s, r) {
|
|
|
203
202
|
setNames: [...t]
|
|
204
203
|
}));
|
|
205
204
|
}
|
|
206
|
-
function
|
|
205
|
+
function _e(e, s) {
|
|
207
206
|
const r = (o, u) => {
|
|
208
207
|
const c = { ...o }, l = JSON.parse(c.conditions || "{}");
|
|
209
208
|
if (u)
|
|
@@ -269,10 +268,10 @@ function Ee(e, s) {
|
|
|
269
268
|
}
|
|
270
269
|
return t;
|
|
271
270
|
}
|
|
272
|
-
function
|
|
271
|
+
function Ee(e) {
|
|
273
272
|
const s = G(
|
|
274
273
|
e,
|
|
275
|
-
|
|
274
|
+
V
|
|
276
275
|
), r = new Set(
|
|
277
276
|
s.filter((i) => {
|
|
278
277
|
var t;
|
|
@@ -289,7 +288,7 @@ function Ne(e) {
|
|
|
289
288
|
return e.filter((i) => i.inverted ? !(r.has(i.subject) && !n.has(i.subject)) : !r.has(i.subject));
|
|
290
289
|
}
|
|
291
290
|
const oe = "business::report::";
|
|
292
|
-
function
|
|
291
|
+
function Ne(e, s) {
|
|
293
292
|
const r = [], n = e.filter((i) => {
|
|
294
293
|
const t = i.subject;
|
|
295
294
|
return !t.startsWith(oe) || s.has(t) ? !0 : (r.push(t), !1);
|
|
@@ -300,7 +299,7 @@ const ae = "business::report::reports::", ce = _.Subject.Business.report_reports
|
|
|
300
299
|
function le(e, s) {
|
|
301
300
|
return e.conditions ? !!s.conditions && e.conditions === s.conditions : !s.conditions;
|
|
302
301
|
}
|
|
303
|
-
function
|
|
302
|
+
function Ue(e, s) {
|
|
304
303
|
const r = e.find(
|
|
305
304
|
(a) => !a.inverted && a.subject === ce
|
|
306
305
|
), n = e.find(
|
|
@@ -522,7 +521,7 @@ function A(e) {
|
|
|
522
521
|
subject: O(p.subject)
|
|
523
522
|
})), l = L(o, c), d = G(
|
|
524
523
|
de(o, c),
|
|
525
|
-
|
|
524
|
+
V
|
|
526
525
|
).filter((p) => !p.inverted), f = Y(d), m = f ?? n.value.map((p) => p._id);
|
|
527
526
|
return {
|
|
528
527
|
doc: e,
|
|
@@ -530,7 +529,7 @@ function A(e) {
|
|
|
530
529
|
name: e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
|
|
531
530
|
phoneNumber: e.phoneNumber,
|
|
532
531
|
email: e.email,
|
|
533
|
-
restaurants:
|
|
532
|
+
restaurants: W(
|
|
534
533
|
m.map((p) => {
|
|
535
534
|
var b;
|
|
536
535
|
return ((b = n.value.find((Z) => Z._id === p)) == null ? void 0 : b.profile.name) ?? "";
|
|
@@ -542,8 +541,8 @@ function A(e) {
|
|
|
542
541
|
};
|
|
543
542
|
}
|
|
544
543
|
const ve = Object.freeze(
|
|
545
|
-
Object.values(
|
|
546
|
-
),
|
|
544
|
+
Object.values(ee)
|
|
545
|
+
), Ce = {
|
|
547
546
|
async readTeamMembers() {
|
|
548
547
|
return g(
|
|
549
548
|
await v().get("/portal-users")
|
|
@@ -598,7 +597,7 @@ const ve = Object.freeze(
|
|
|
598
597
|
)}`;
|
|
599
598
|
}
|
|
600
599
|
};
|
|
601
|
-
function
|
|
600
|
+
function Je(e, s, r) {
|
|
602
601
|
if (e.some((a) => a.subject === "all")) return "All";
|
|
603
602
|
const n = (r ?? M).filter(
|
|
604
603
|
(a) => a.subject === s
|
|
@@ -606,7 +605,7 @@ function Te(e, s, r) {
|
|
|
606
605
|
return t.length === n.length ? "All" : t.length === 0 ? "-" : `${t.length} permission allow`;
|
|
607
606
|
}
|
|
608
607
|
function w(e) {
|
|
609
|
-
const s =
|
|
608
|
+
const s = q(e), r = s.subject;
|
|
610
609
|
return {
|
|
611
610
|
...s,
|
|
612
611
|
get conditions() {
|
|
@@ -661,7 +660,7 @@ function w(e) {
|
|
|
661
660
|
}
|
|
662
661
|
};
|
|
663
662
|
}
|
|
664
|
-
function
|
|
663
|
+
function Te(e) {
|
|
665
664
|
var n, i;
|
|
666
665
|
const s = e.map((t) => w(t)).find((t) => t.isDiscountOperation);
|
|
667
666
|
if (!s) return 100;
|
|
@@ -674,23 +673,23 @@ function Y(e) {
|
|
|
674
673
|
);
|
|
675
674
|
return s ? s.conditions ? JSON.parse(s.conditions).restaurantId.$in : null : [];
|
|
676
675
|
}
|
|
677
|
-
function
|
|
676
|
+
function Be(e, s) {
|
|
678
677
|
return s.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: Y(e), roleIds: be(e) };
|
|
679
678
|
}
|
|
680
|
-
function
|
|
679
|
+
function Me(e) {
|
|
681
680
|
return (e == null ? void 0 : e.some((s) => s.subject === "all")) ?? !1;
|
|
682
681
|
}
|
|
683
682
|
function be(e) {
|
|
684
683
|
const s = e.find((r) => r.subject === _.Subject.Business.role);
|
|
685
684
|
return s ? s.conditions ? JSON.parse(s.conditions).roleId.$in : null : [];
|
|
686
685
|
}
|
|
687
|
-
function
|
|
686
|
+
function Le(e) {
|
|
688
687
|
const s = w(e);
|
|
689
688
|
if (!s.isReportPermission) return;
|
|
690
689
|
const { name: r, ...n } = s.conditions ?? {};
|
|
691
690
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
692
691
|
}
|
|
693
|
-
function
|
|
692
|
+
function Fe(e, s, r) {
|
|
694
693
|
return e.flatMap((n) => {
|
|
695
694
|
const i = Se(n);
|
|
696
695
|
if (!i) return [];
|
|
@@ -725,7 +724,7 @@ function Se(e) {
|
|
|
725
724
|
reason: ""
|
|
726
725
|
})) : i = M.find((t) => t.subject === r), i ? w(i) : void 0;
|
|
727
726
|
}
|
|
728
|
-
function
|
|
727
|
+
function xe(e, s) {
|
|
729
728
|
const r = { values: [], passthrough: [], dropped: [] };
|
|
730
729
|
for (const n of e) {
|
|
731
730
|
const i = n == null ? void 0 : n.actions;
|
|
@@ -739,7 +738,7 @@ function De(e, s) {
|
|
|
739
738
|
return r;
|
|
740
739
|
}
|
|
741
740
|
function he(e, s = []) {
|
|
742
|
-
return
|
|
741
|
+
return W(
|
|
743
742
|
e.reduce((r, n) => {
|
|
744
743
|
const i = ve.find(
|
|
745
744
|
(t) => t.subject === n.subject && n.actions.includes("manage")
|
|
@@ -756,29 +755,29 @@ export {
|
|
|
756
755
|
G as N,
|
|
757
756
|
Q as P,
|
|
758
757
|
pe as R,
|
|
759
|
-
|
|
758
|
+
Je as a,
|
|
760
759
|
de as b,
|
|
761
760
|
H as c,
|
|
762
761
|
ge as d,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
762
|
+
Le as e,
|
|
763
|
+
Fe as f,
|
|
764
|
+
Te as g,
|
|
765
|
+
Me as h,
|
|
767
766
|
oe as i,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
767
|
+
Be as j,
|
|
768
|
+
Ee as k,
|
|
769
|
+
_e as l,
|
|
770
|
+
Ae as m,
|
|
771
|
+
Ne as n,
|
|
772
|
+
Ue as o,
|
|
774
773
|
ve as p,
|
|
775
774
|
me as q,
|
|
776
775
|
w as r,
|
|
777
|
-
|
|
778
|
-
|
|
776
|
+
xe as s,
|
|
777
|
+
Ce as t,
|
|
779
778
|
re as u,
|
|
780
779
|
he as v,
|
|
781
|
-
|
|
780
|
+
Oe as w,
|
|
782
781
|
Y as x,
|
|
783
782
|
be as y
|
|
784
783
|
};
|
|
@@ -2,5 +2,9 @@ import type { ScheduleAutoScheduleApi } from '../composables/useScheduleAutoSche
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
autoSchedule: ScheduleAutoScheduleApi;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
setDemand: () => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onSetDemand?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
10
|
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -15,24 +15,40 @@ export interface ScheduleSelectOption {
|
|
|
15
15
|
command?: boolean;
|
|
16
16
|
}
|
|
17
17
|
declare const _default: import("vue").DefineComponent<{
|
|
18
|
-
modelValue
|
|
18
|
+
modelValue?: string;
|
|
19
19
|
options: ScheduleSelectOption[];
|
|
20
|
+
/** Multi-select: the menu stays open on a pick, rows show a tick for every value in
|
|
21
|
+
* `selected`, and a pick emits `toggle` instead of `update:modelValue`. Commands still
|
|
22
|
+
* close the menu and emit `update:modelValue`. */
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
selected?: string[];
|
|
25
|
+
/** Closed-control text while a multi-select has nothing picked. */
|
|
26
|
+
placeholder?: string;
|
|
20
27
|
disabled?: boolean;
|
|
21
28
|
/** Heading over the menu. Also switches to the rich layout. */
|
|
22
29
|
menuTitle?: string;
|
|
23
30
|
/** A filter box at the top of the menu, for lists long enough to hunt through (outlets). */
|
|
24
31
|
searchable?: boolean;
|
|
25
32
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
toggle: (value: string) => any;
|
|
26
34
|
"update:modelValue": (value: string) => any;
|
|
27
35
|
}, string, import("vue").PublicProps, Readonly<{
|
|
28
|
-
modelValue
|
|
36
|
+
modelValue?: string;
|
|
29
37
|
options: ScheduleSelectOption[];
|
|
38
|
+
/** Multi-select: the menu stays open on a pick, rows show a tick for every value in
|
|
39
|
+
* `selected`, and a pick emits `toggle` instead of `update:modelValue`. Commands still
|
|
40
|
+
* close the menu and emit `update:modelValue`. */
|
|
41
|
+
multiple?: boolean;
|
|
42
|
+
selected?: string[];
|
|
43
|
+
/** Closed-control text while a multi-select has nothing picked. */
|
|
44
|
+
placeholder?: string;
|
|
30
45
|
disabled?: boolean;
|
|
31
46
|
/** Heading over the menu. Also switches to the rich layout. */
|
|
32
47
|
menuTitle?: string;
|
|
33
48
|
/** A filter box at the top of the menu, for lists long enough to hunt through (outlets). */
|
|
34
49
|
searchable?: boolean;
|
|
35
50
|
}> & Readonly<{
|
|
51
|
+
onToggle?: ((value: string) => any) | undefined;
|
|
36
52
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
37
53
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
54
|
export default _default;
|
|
@@ -18,6 +18,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
18
18
|
dragEnd: () => any;
|
|
19
19
|
openMenu: (empId: number, dayIdx: number, anchor: HTMLElement) => any;
|
|
20
20
|
toggleProposal: (id: number) => any;
|
|
21
|
+
proposalDragStart: (id: number, ev: DragEvent) => any;
|
|
22
|
+
proposalDragEnd: () => any;
|
|
21
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
24
|
onDrop?: ((empId: number, dayIdx: number, ev: DragEvent) => any) | undefined;
|
|
23
25
|
onAddShift?: ((empId: number, dayIdx: number, anchor: HTMLElement) => any) | undefined;
|
|
@@ -27,5 +29,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
27
29
|
onDragEnd?: (() => any) | undefined;
|
|
28
30
|
onOpenMenu?: ((empId: number, dayIdx: number, anchor: HTMLElement) => any) | undefined;
|
|
29
31
|
onToggleProposal?: ((id: number) => any) | undefined;
|
|
32
|
+
onProposalDragStart?: ((id: number, ev: DragEvent) => any) | undefined;
|
|
33
|
+
onProposalDragEnd?: (() => any) | undefined;
|
|
30
34
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
35
|
export default _default;
|
|
@@ -18,6 +18,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
18
18
|
editLeave: (empId: number, dayIdx: number) => any;
|
|
19
19
|
dragEnd: () => any;
|
|
20
20
|
toggleProposal: (id: number) => any;
|
|
21
|
+
proposalDragStart: (id: number, ev: DragEvent) => any;
|
|
22
|
+
proposalDragEnd: () => any;
|
|
21
23
|
openAssign: (openId: number) => any;
|
|
22
24
|
openOpenShiftMenu: (openId: number, anchor: HTMLElement) => any;
|
|
23
25
|
addOpenShift: (dayIdx: number) => any;
|
|
@@ -38,6 +40,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
38
40
|
onEditLeave?: ((empId: number, dayIdx: number) => any) | undefined;
|
|
39
41
|
onDragEnd?: (() => any) | undefined;
|
|
40
42
|
onToggleProposal?: ((id: number) => any) | undefined;
|
|
43
|
+
onProposalDragStart?: ((id: number, ev: DragEvent) => any) | undefined;
|
|
44
|
+
onProposalDragEnd?: (() => any) | undefined;
|
|
41
45
|
onOpenAssign?: ((openId: number) => any) | undefined;
|
|
42
46
|
onOpenOpenShiftMenu?: ((openId: number, anchor: HTMLElement) => any) | undefined;
|
|
43
47
|
onAddOpenShift?: ((dayIdx: number) => any) | undefined;
|
|
@@ -11,10 +11,10 @@ type __VLS_Props = {
|
|
|
11
11
|
exportApi: ScheduleExportApi;
|
|
12
12
|
};
|
|
13
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
clear: (kind: "shifts" | "both" | "demand") => any;
|
|
14
15
|
"sch-status-click": () => any;
|
|
15
|
-
"clear-shifts": () => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onClear?: ((kind: "shifts" | "both" | "demand") => any) | undefined;
|
|
17
18
|
"onSch-status-click"?: (() => any) | undefined;
|
|
18
|
-
"onClear-shifts"?: (() => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
export default _default;
|
|
@@ -24,6 +24,10 @@ export interface ScheduleAddEmployeeForm {
|
|
|
24
24
|
seniority: '' | 'senior' | 'junior';
|
|
25
25
|
passcode: string[];
|
|
26
26
|
masterUser: boolean;
|
|
27
|
+
/** POS role for a brand-new user (applied at every outlet in `locations`). */
|
|
28
|
+
roleId: string;
|
|
29
|
+
/** Required by the POS for a master user. */
|
|
30
|
+
masterCode: string;
|
|
27
31
|
}
|
|
28
32
|
/** A salaried month, for converting a monthly figure into the hourly one the cost rail
|
|
29
33
|
* actually reads. Ported verbatim from the mockup's MONTH_HOURS. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FdtoScheduleAutoScheduleObjective } from '@/types/schedule';
|
|
2
|
+
import type { CoverageSegment, Employee, Proposal } from '../types';
|
|
3
|
+
export interface SolverInput {
|
|
4
|
+
dayCount: number;
|
|
5
|
+
employees: Employee[];
|
|
6
|
+
/** Coverage of a day against an explicit set of employees (the working copy). */
|
|
7
|
+
segmentsWith: (dayIdx: number, employees: Employee[]) => CoverageSegment[];
|
|
8
|
+
/** Days the board will not take shifts on (locked week). */
|
|
9
|
+
skipDay: (dayIdx: number) => boolean;
|
|
10
|
+
objective: FdtoScheduleAutoScheduleObjective;
|
|
11
|
+
allowOvertime: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SolverOutput {
|
|
14
|
+
proposals: Proposal[];
|
|
15
|
+
unfilled: number;
|
|
16
|
+
totalHours: number;
|
|
17
|
+
overtimeHours: number;
|
|
18
|
+
cost: number;
|
|
19
|
+
explanations: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare function solveAutoSchedule(input: SolverInput): SolverOutput;
|
|
@@ -33,6 +33,8 @@ export declare function useScheduleAddEmployee(board: ScheduleBoardApi): {
|
|
|
33
33
|
seniority: "" | "senior" | "junior";
|
|
34
34
|
passcode: string[];
|
|
35
35
|
masterUser: boolean;
|
|
36
|
+
roleId: string;
|
|
37
|
+
masterCode: string;
|
|
36
38
|
};
|
|
37
39
|
sectionId: import("vue").Ref<string, string>;
|
|
38
40
|
isEditing: import("vue").ComputedRef<boolean>;
|
|
@@ -49,6 +51,15 @@ export declare function useScheduleAddEmployee(board: ScheduleBoardApi): {
|
|
|
49
51
|
effectiveRate: import("vue").ComputedRef<number>;
|
|
50
52
|
passcodeValue: import("vue").ComputedRef<string>;
|
|
51
53
|
passcodeOk: import("vue").ComputedRef<boolean>;
|
|
54
|
+
currentLocationLabel: import("vue").ComputedRef<string>;
|
|
55
|
+
roleOptions: import("vue").ComputedRef<{
|
|
56
|
+
value: string;
|
|
57
|
+
label: string;
|
|
58
|
+
}[]>;
|
|
59
|
+
roleError: import("vue").ComputedRef<boolean>;
|
|
60
|
+
masterCodeError: import("vue").ComputedRef<boolean>;
|
|
61
|
+
isNewUser: import("vue").ComputedRef<boolean>;
|
|
62
|
+
needsRole: import("vue").ComputedRef<boolean>;
|
|
52
63
|
footerHint: import("vue").ComputedRef<"Pick who — this outlet's own pay, position and hours are still set here." | "One short form. Rest days are set on their profile afterwards.">;
|
|
53
64
|
primaryRoleLabel: import("vue").ComputedRef<string>;
|
|
54
65
|
locationsSummary: import("vue").ComputedRef<string>;
|
|
@@ -102,22 +102,16 @@ export declare function useScheduleAutoSchedule(board: ScheduleBoardApi, demand:
|
|
|
102
102
|
solver: string;
|
|
103
103
|
} | null>;
|
|
104
104
|
gapCount: import("vue").ComputedRef<number>;
|
|
105
|
+
hasDemand: import("vue").ComputedRef<boolean>;
|
|
106
|
+
noDemandOpen: import("vue").Ref<boolean, boolean>;
|
|
107
|
+
rangeLabel: import("vue").ComputedRef<string>;
|
|
105
108
|
openWizard: () => void;
|
|
106
109
|
closeWizard: () => void;
|
|
107
110
|
next: () => void;
|
|
108
111
|
back: () => void;
|
|
109
112
|
generate: () => Promise<void>;
|
|
110
|
-
reviewMode: import("vue").
|
|
111
|
-
proposals: import("vue").
|
|
112
|
-
id: number;
|
|
113
|
-
empId: number;
|
|
114
|
-
dayIdx: number;
|
|
115
|
-
start: string;
|
|
116
|
-
end: string;
|
|
117
|
-
role: string;
|
|
118
|
-
openId?: number | undefined;
|
|
119
|
-
status: "pending" | "rejected";
|
|
120
|
-
}[], Proposal[] | {
|
|
113
|
+
reviewMode: import("vue").ComputedRef<boolean>;
|
|
114
|
+
proposals: import("vue").ComputedRef<{
|
|
121
115
|
id: number;
|
|
122
116
|
empId: number;
|
|
123
117
|
dayIdx: number;
|
|
@@ -126,7 +120,10 @@ export declare function useScheduleAutoSchedule(board: ScheduleBoardApi, demand:
|
|
|
126
120
|
role: string;
|
|
127
121
|
openId?: number | undefined;
|
|
128
122
|
status: "pending" | "rejected";
|
|
123
|
+
weekKey?: string | undefined;
|
|
124
|
+
reason?: string | undefined;
|
|
129
125
|
}[]>;
|
|
126
|
+
weekHasProposals: import("vue").ComputedRef<boolean>;
|
|
130
127
|
unmetCount: import("vue").Ref<number, number>;
|
|
131
128
|
acceptedCount: import("vue").ComputedRef<number>;
|
|
132
129
|
rejectedCount: import("vue").ComputedRef<number>;
|
|
@@ -136,6 +133,8 @@ export declare function useScheduleAutoSchedule(board: ScheduleBoardApi, demand:
|
|
|
136
133
|
conflictCount: import("vue").ComputedRef<number>;
|
|
137
134
|
projectedCost: import("vue").ComputedRef<number | null>;
|
|
138
135
|
proposalAt: (empId: number, dayIdx: number) => Proposal | undefined;
|
|
136
|
+
draggingId: import("vue").Ref<number | null, number | null>;
|
|
137
|
+
moveProposal: (id: number, empId: number, dayIdx: number) => string | null;
|
|
139
138
|
toggleReject: (id: number) => void;
|
|
140
139
|
rejectAll: () => void;
|
|
141
140
|
exitReview: () => void;
|
|
@@ -10,8 +10,10 @@ export interface ScheduleCopySkipReport {
|
|
|
10
10
|
* board's per-week-offset bucket cache instead of the mockup's absolute 91-day horizon. Split
|
|
11
11
|
* shifts (copyUnitsOf in the mockup) aren't ported — WorkSlot has no splitId concept in this
|
|
12
12
|
* data model, so each slot is copied as its own unit. */
|
|
13
|
-
export declare function useScheduleCopyWeek(board: ScheduleBoardApi
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export declare function useScheduleCopyWeek(board: ScheduleBoardApi, handlers?: {
|
|
14
|
+
onDemandChanged?: () => void;
|
|
15
|
+
}): {
|
|
16
|
+
copyLastWeek: (mode: "staffed" | "open") => Promise<void>;
|
|
17
|
+
copyThisWeekForward: (mode: "staffed" | "open") => Promise<void>;
|
|
16
18
|
};
|
|
17
19
|
export type ScheduleCopyWeekApi = ReturnType<typeof useScheduleCopyWeek>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CoverageSegment, DaySlot, DemandPeriod } from '../types';
|
|
1
|
+
import type { CoverageSegment, DaySlot, DemandPeriod, Employee, Proposal } from '../types';
|
|
2
2
|
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
3
3
|
export declare function toMin(t: string): number;
|
|
4
4
|
export declare function minToHHMM(m: number): string;
|
|
@@ -40,6 +40,12 @@ export declare function useScheduleDemand(board: ScheduleBoardApi): {
|
|
|
40
40
|
setWeekdayDemand: (weekday: number, periods: DemandPeriod[]) => void;
|
|
41
41
|
coverageAxis: (dayIdx: number) => ScheduleCoverageAxis;
|
|
42
42
|
coverageSegments: (dayIdx: number) => CoverageSegment[];
|
|
43
|
+
setPreview: (items: Proposal[]) => void;
|
|
44
|
+
segmentsWith: (dayIdx: number, employees: Employee[]) => CoverageSegment[];
|
|
45
|
+
dayHeadcount: (dayIdx: number) => {
|
|
46
|
+
crew: number;
|
|
47
|
+
peak: number;
|
|
48
|
+
};
|
|
43
49
|
coverageImpact: (dayIdx: number, empId: number | null, slot: DaySlot) => {
|
|
44
50
|
when: string;
|
|
45
51
|
pctBefore: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Employee } from '../types';
|
|
1
|
+
import type { Employee, Proposal } from '../types';
|
|
2
2
|
/** The one form every SMALL avatar wears — `.sc-av`, `.ch-av`, `.ap-av`, `.tl-av`, and the
|
|
3
3
|
* shift editor's `.sp2-who-av`. A tint of the person's colour behind their own colour, never a
|
|
4
4
|
* solid fill with white text: at 17–30px the initials are the only identifier, and knocking
|
|
@@ -21,7 +21,16 @@ export interface ScheduleEmployeeLoad {
|
|
|
21
21
|
pct: number;
|
|
22
22
|
barColor: string;
|
|
23
23
|
otHours: number;
|
|
24
|
+
/** Of `hours`, how many are auto-schedule suggestions not yet on the board. */
|
|
25
|
+
proposedHours: number;
|
|
26
|
+
/** The board's own hours as a fraction of contract: where the fill ends and the suggested part starts. */
|
|
27
|
+
boardPct: number;
|
|
28
|
+
/** The suggested part's width on the bar, as a fraction of contract. With no contract to measure
|
|
29
|
+
* against it fills the track, so suggested hours still show. */
|
|
30
|
+
proposedPct: number;
|
|
24
31
|
}
|
|
32
|
+
/** This person's live (not rejected) suggestions in the week on screen. */
|
|
33
|
+
export declare function proposedSlotsOf(emp: Employee, proposalAt?: (empId: number, dayIdx: number) => Proposal | undefined): Pick<Proposal, 'start' | 'end'>[];
|
|
25
34
|
/** One person's load against their contract, derived from the shifts actually on the board
|
|
26
35
|
* rather than from the stored `weekHours` field, so the bar can never disagree with the row
|
|
27
36
|
* of cards beside it.
|
|
@@ -29,4 +38,4 @@ export interface ScheduleEmployeeLoad {
|
|
|
29
38
|
* The staff rail (area view) and the grid's name column (employee view) are the same list of
|
|
30
39
|
* the same people; they used to be two pieces of markup reading two different numbers. This
|
|
31
40
|
* is the single one — the mockup's own note on empIdentityHTML(). */
|
|
32
|
-
export declare function employeeLoadOf(emp: Employee): ScheduleEmployeeLoad;
|
|
41
|
+
export declare function employeeLoadOf(emp: Employee, proposed?: Pick<Proposal, 'start' | 'end'>[]): ScheduleEmployeeLoad;
|
|
@@ -1244,6 +1244,8 @@ export declare function useScheduleOnboardingWizard(board: ScheduleBoardApi, add
|
|
|
1244
1244
|
seniority: "" | "senior" | "junior";
|
|
1245
1245
|
passcode: string[];
|
|
1246
1246
|
masterUser: boolean;
|
|
1247
|
+
roleId: string;
|
|
1248
|
+
masterCode: string;
|
|
1247
1249
|
};
|
|
1248
1250
|
sectionId: import("vue").Ref<string, string>;
|
|
1249
1251
|
isEditing: import("vue").ComputedRef<boolean>;
|
|
@@ -1260,6 +1262,15 @@ export declare function useScheduleOnboardingWizard(board: ScheduleBoardApi, add
|
|
|
1260
1262
|
effectiveRate: import("vue").ComputedRef<number>;
|
|
1261
1263
|
passcodeValue: import("vue").ComputedRef<string>;
|
|
1262
1264
|
passcodeOk: import("vue").ComputedRef<boolean>;
|
|
1265
|
+
currentLocationLabel: import("vue").ComputedRef<string>;
|
|
1266
|
+
roleOptions: import("vue").ComputedRef<{
|
|
1267
|
+
value: string;
|
|
1268
|
+
label: string;
|
|
1269
|
+
}[]>;
|
|
1270
|
+
roleError: import("vue").ComputedRef<boolean>;
|
|
1271
|
+
masterCodeError: import("vue").ComputedRef<boolean>;
|
|
1272
|
+
isNewUser: import("vue").ComputedRef<boolean>;
|
|
1273
|
+
needsRole: import("vue").ComputedRef<boolean>;
|
|
1263
1274
|
footerHint: import("vue").ComputedRef<"Pick who — this outlet's own pay, position and hours are still set here." | "One short form. Rest days are set on their profile afterwards.">;
|
|
1264
1275
|
primaryRoleLabel: import("vue").ComputedRef<string>;
|
|
1265
1276
|
locationsSummary: import("vue").ComputedRef<string>;
|
|
@@ -14,6 +14,7 @@ export declare function useScheduleOutlet(): {
|
|
|
14
14
|
ready: import("vue").Ref<boolean, boolean>;
|
|
15
15
|
outletId: import("vue").Ref<string, string>;
|
|
16
16
|
resolve: () => Promise<string>;
|
|
17
|
+
resolveOutlet: () => Promise<string>;
|
|
17
18
|
switchTo: (restaurantId: string, weekStart: Date) => Promise<boolean>;
|
|
18
19
|
};
|
|
19
20
|
export type ScheduleOutletApi = ReturnType<typeof useScheduleOutlet>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Proposal } from '../types';
|
|
1
2
|
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
2
3
|
import type { ScheduleEmployeeLoad } from './useScheduleEmployeeIdentity';
|
|
3
4
|
export type ScheduleRailSort = 'load' | 'name' | 'hours' | 'cost';
|
|
@@ -8,7 +9,9 @@ export type ScheduleRailRow = ScheduleEmployeeLoad;
|
|
|
8
9
|
* column shows, plus each person's load bar and an "Open shifts" jump summary. Ported from
|
|
9
10
|
* the mockup's renderStaffRail()/orderedRoster()/staffLoad(), scoped to a single week (no
|
|
10
11
|
* day/area combination — Daily view stays employee-only for now). */
|
|
11
|
-
export declare function useScheduleStaffRail(board: ScheduleBoardApi
|
|
12
|
+
export declare function useScheduleStaffRail(board: ScheduleBoardApi,
|
|
13
|
+
/** Lazy: the auto-scheduler is built after the rail, and only read when rows are computed. */
|
|
14
|
+
proposalAt?: () => ((empId: number, dayIdx: number) => Proposal | undefined) | undefined): {
|
|
12
15
|
search: import("vue").Ref<string, string>;
|
|
13
16
|
sort: import("vue").Ref<ScheduleRailSort, ScheduleRailSort>;
|
|
14
17
|
rows: import("vue").ComputedRef<ScheduleEmployeeLoad[]>;
|
|
@@ -6,6 +6,8 @@ import type { FdtoScheduleAssignment, FdtoScheduleAutoScheduleReq, FdtoScheduleA
|
|
|
6
6
|
export declare function isoDate(d: Date): string;
|
|
7
7
|
export declare const payload: import("vue").ShallowRef<FdtoScheduleBoard | null, FdtoScheduleBoard | null>;
|
|
8
8
|
export declare const loading: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
/** The POS roster (who the board's rows are) is fetched separately from the board window. */
|
|
10
|
+
export declare const rosterLoading: import("vue").Ref<boolean, boolean>;
|
|
9
11
|
export declare const loadError: import("vue").Ref<string | null, string | null>;
|
|
10
12
|
/** Whether this outlet has finished setting up scheduling (onboarding). The schedule settings
|
|
11
13
|
* will carry this, but the backend has no such field yet, so it is a plain flag that defaults to
|
|
@@ -59,11 +61,28 @@ export declare function setOutlet(restaurantId: string): boolean;
|
|
|
59
61
|
* separate invalidation path. A generous page size rather than looping pages: real restaurant
|
|
60
62
|
* headcounts sit nowhere near it. */
|
|
61
63
|
export declare function ensureRestaurantEmployeesLoaded(restaurantId: string): Promise<void>;
|
|
64
|
+
/** Re-reads this outlet's POS roster. The roster is what the board's rows are built from and is
|
|
65
|
+
* otherwise fetched once per outlet, so any write that changes who works here (add, remove)
|
|
66
|
+
* has to call this for the grid to show it. */
|
|
67
|
+
export declare function refreshRestaurantEmployees(): Promise<void>;
|
|
68
|
+
/** Gives an existing POS user a role at this outlet, so they land on its roster. */
|
|
69
|
+
export declare function addEmployeeToOutlet(employeeId: string, roleId: string): Promise<void>;
|
|
70
|
+
/** Takes a POS user off the given outlets' rosters; their other outlets are untouched. */
|
|
71
|
+
export declare function removeEmployeeFromOutlets(employeeId: string, restaurantIds: string[]): Promise<void>;
|
|
72
|
+
/** Takes a POS user off this outlet's roster only. */
|
|
73
|
+
export declare function removeEmployeeFromOutlet(employeeId: string): Promise<void>;
|
|
62
74
|
/** Every outlet each person works at (POS user id → outlet ids). The roster above is fetched
|
|
63
75
|
* FILTERED to one outlet, and a filtered read describes a person by that outlet alone, so the
|
|
64
76
|
* full list has to come from an unfiltered read. Paged until the total is covered. A failure
|
|
65
77
|
* leaves the map empty rather than failing the board: locations are display-only here. */
|
|
66
78
|
export declare const employeeOutletIds: import("vue").ShallowRef<Record<string, string[]>, Record<string, string[]>>;
|
|
79
|
+
/** Everyone in the business (POS user summaries: name, passcode, outlet roles), kept once and
|
|
80
|
+
* shared by the locations map, "select existing employee", passcode prefill and the role edits —
|
|
81
|
+
* the plain `/pos-users` read they used before returns every user-outlet row in one slow call. */
|
|
82
|
+
export declare const businessEmployees: import("vue").ShallowRef<IFdtoPosUserSummary[], IFdtoPosUserSummary[]>;
|
|
83
|
+
/** The cached business roster, fetched on first use. `force` re-reads it (after a write, or to
|
|
84
|
+
* refresh a list that is already on screen). Concurrent callers share one request. */
|
|
85
|
+
export declare function ensureBusinessEmployees(force?: boolean): Promise<IFdtoPosUserSummary[]>;
|
|
67
86
|
/** Guarantees the week starting `weekStart` is in memory, fetching a padded window around it
|
|
68
87
|
* if it is not. Safe to call on every navigation: a week already covered costs nothing. */
|
|
69
88
|
export declare function ensureWeekLoaded(weekStart: Date): Promise<void>;
|
|
@@ -109,6 +128,12 @@ export declare function saveScheduleDay(date: string, req: FdtoScheduleSaveSched
|
|
|
109
128
|
* Position-specific headcount becomes its own row; any remaining headcount becomes an
|
|
110
129
|
* unpositioned row for the same time range. */
|
|
111
130
|
export declare function saveDemand(req: ScheduleReplaceDemandReq): Promise<void>;
|
|
131
|
+
/** Copies one date's own demand rows onto another date, as that date's own rows. A date that
|
|
132
|
+
* already has demand of its own is left alone (nothing is overwritten), and a source date with
|
|
133
|
+
* none has nothing to copy: the standing weekday rule already covers the same weekday in every
|
|
134
|
+
* week, so repeating it per date would only shadow later edits to the rule. Returns how many rows
|
|
135
|
+
* were written. */
|
|
136
|
+
export declare function copyDateDemand(fromDate: string, toDate: string): Promise<number>;
|
|
112
137
|
export declare function generateAutoSchedule(req: FdtoScheduleAutoScheduleReq): Promise<FdtoScheduleAutoScheduleResult>;
|
|
113
138
|
/** A one-off shift assignment — someone working these hours on this date, not answering any
|
|
114
139
|
* Shift requirement. Deliberately does not reload: unlike `createEmployeeProfile` above, there
|
|
@@ -316,4 +316,9 @@ export interface Proposal {
|
|
|
316
316
|
/** Set when this proposal would fill a named OpenShift record. */
|
|
317
317
|
openId?: number;
|
|
318
318
|
status: 'pending' | 'rejected';
|
|
319
|
+
/** The week these belong to: its first day's date. Proposals are day positions, so without
|
|
320
|
+
* this they would appear on whichever week is showing. */
|
|
321
|
+
weekKey?: string;
|
|
322
|
+
/** Why this person, for the card's tooltip. */
|
|
323
|
+
reason?: string;
|
|
319
324
|
}
|