@feedmepos/mf-hrm-portal 2.3.2-dev.4 → 2.3.2-dev.6
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-BPTnWcra.js → ApprovalCodeList-ix9OeJEQ.js} +7 -7
- package/dist/{AuditLogList-CvEF4bit.js → AuditLogList-D5H_O9Q0.js} +5 -5
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CPX0sv64.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CuELLYY4.js} +10 -10
- package/dist/{EmployeeList-CANPsrQY.js → EmployeeList-DICzZjVM.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js → FormSection.vue_vue_type_script_setup_true_lang-BQzSWAqC.js} +1 -1
- package/dist/{GrantUserList-DPj_6Wsg.js → GrantUserList-DoMN7Eks.js} +8 -8
- package/dist/{Main-Cob4hcf-.js → Main-CHIExpOV.js} +5 -5
- package/dist/{Main-BWRMirTY.js → Main-CQ42sYi9.js} +11 -11
- package/dist/{Main-DXcSgkhR.js → Main-DwYh9cxQ.js} +10 -10
- package/dist/{MyPosProfile-Bp7-pATz.js → MyPosProfile-DaUdREQX.js} +100 -111
- package/dist/{PermissionSetList-DvAW1q0c.js → PermissionSetList-B7WM9N-p.js} +66 -66
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BSVtyLlL.js +4207 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C7fnnbme.js} +1 -1
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-Bq8-aBSv.js → RoleForm.vue_vue_type_script_setup_true_lang-AbQIllkX.js} +30 -30
- package/dist/{RoleList-DsrHgU4s.js → RoleList-vQsHxlNc.js} +96 -105
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRR18xmB.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D52LhvGG.js} +1 -1
- package/dist/{ScheduleGeneralPage-C_Kj9wmp.js → ScheduleGeneralPage-BLqh7jH6.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3oQ6lE86.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C9doSgov.js} +4 -4
- package/dist/{SchedulePage-9dFXxWwZ.js → SchedulePage-YADV_6w9.js} +9 -9
- package/dist/{SchedulePositionPage-Dea5X8Sa.js → SchedulePositionPage-BowDQMG_.js} +3 -3
- package/dist/{SelectFilter-Dr9lB6Ta.js → SelectFilter-CBp1qxLd.js} +2 -3
- package/dist/{TeamMemberList-Bu9QNP9W.js → TeamMemberList-BoJ87moU.js} +184 -184
- package/dist/TimesheetList-BULw75oo.js +401 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js → TimesheetList.vue_vue_type_style_index_0_scoped_c98b0b84_lang-VlnjH9aQ.js} +3 -3
- package/dist/{app-BHQJX4L4.js → app-DOFDND9j.js} +5454 -4639
- package/dist/app.js +1 -1
- package/dist/{approval-code-w0rZJeYU.js → approval-code-Dgj6S82q.js} +1 -1
- package/dist/{dayjs.min-C4H4diN8.js → dayjs.min-AoirQCgL.js} +16 -16
- package/dist/{employee-BEwUmdt6.js → employee-VB6YmuSS.js} +5 -5
- package/dist/{grant-user-DdxPMH5_.js → grant-user-C-ptrq7l.js} +1 -1
- package/dist/{iteration-DBHifssn.js → iteration-DmuDXP8U.js} +1 -1
- package/dist/{lodash-DqZsWm-0.js → lodash-CBFO-xTu.js} +1 -1
- package/dist/member-grant-CHOB8eQ_.js +54 -0
- package/dist/restaurant-DH2Fxzi7.js +52 -0
- package/dist/role-DUpHwRiY.js +97 -0
- package/dist/rule-aUPH1VOW.js +842 -0
- package/dist/src/api/my-pos-profile/index.d.ts +1 -3
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +61 -1
- package/dist/src/types/my-pos-profile.d.ts +2 -3
- package/dist/src/views/audit-log/locales/index.d.ts +12 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BUmFt2dT.js → useAppStore-DwmJbpf-.js} +1 -1
- package/dist/{useLoading-oHRj4RgU.js → useLoading-Dmlm4oSU.js} +1 -1
- package/dist/{useReportPermissions-CpcyfEuV.js → useReportPermissions-XPn-p57R.js} +5 -5
- package/package.json +3 -3
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js +0 -4243
- package/dist/TimesheetList-B98l028z.js +0 -402
- package/dist/member-grant-DOigVnBR.js +0 -55
- package/dist/restaurant-2xCb2x26.js +0 -51
- package/dist/role-C8STcmLJ.js +0 -93
- package/dist/rule-BkL34-Ma.js +0 -788
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { ref as d, computed as p, defineComponent as fe, onMounted as he, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as n, withCtx as y, createCommentVNode as ge, toDisplayString as O, createTextVNode as we, isRef as ye, renderList as be, createBlock as te, nextTick as _e } from "vue";
|
|
2
|
+
import { d as f } from "./dayjs.min-AoirQCgL.js";
|
|
3
|
+
import { useI18n as xe } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as De, components as Se } from "@feedmepos/ui-library";
|
|
5
|
+
import { S as Ve } from "./SelectFilter-CBp1qxLd.js";
|
|
6
|
+
import { _ as Ce, a as ke } from "./app-DOFDND9j.js";
|
|
7
|
+
import { _ as Fe } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
8
|
+
import { u as Me } from "./useLoading-Dmlm4oSU.js";
|
|
9
|
+
import { g as Ye, s as Le } from "./iteration-DmuDXP8U.js";
|
|
10
|
+
import { f as Te } from "./utils-BZkjJbju.js";
|
|
11
|
+
import { n as Ie } from "./string-DZQ1uNjn.js";
|
|
12
|
+
import { u as Re } from "./employee-VB6YmuSS.js";
|
|
13
|
+
import { u as $e } from "./restaurant-DH2Fxzi7.js";
|
|
14
|
+
import { u as Ee } from "./TimesheetList.vue_vue_type_style_index_0_scoped_c98b0b84_lang-VlnjH9aQ.js";
|
|
15
|
+
function Oe(b, a) {
|
|
16
|
+
return ["years", "months"].find((x) => {
|
|
17
|
+
const D = b.startOf(x), v = b.endOf(x);
|
|
18
|
+
return b.isSame(D, "day") && a.isSame(v, "day");
|
|
19
|
+
}) || "days";
|
|
20
|
+
}
|
|
21
|
+
function Ae() {
|
|
22
|
+
const b = {
|
|
23
|
+
startDate: f().format("YYYY-MM-DD"),
|
|
24
|
+
endDate: f().format("YYYY-MM-DD")
|
|
25
|
+
}, a = d(b), _ = p(() => {
|
|
26
|
+
if (!a.value) return "No dates selected.";
|
|
27
|
+
const v = a.value.startDate ?? "Start", w = a.value.endDate ?? "End";
|
|
28
|
+
return `${v} - ${w}`;
|
|
29
|
+
}), x = p(() => ({
|
|
30
|
+
startDate: new Date(a.value.startDate),
|
|
31
|
+
endDate: new Date(a.value.endDate)
|
|
32
|
+
}));
|
|
33
|
+
function D(v) {
|
|
34
|
+
const w = f(a.value.startDate), c = f(a.value.endDate), h = Oe(w, c), S = h === "days" ? c.diff(w, "days") + 1 : 1, V = v === "subtract" ? (C) => C.subtract(S, h) : (C) => C.add(S, h);
|
|
35
|
+
a.value = {
|
|
36
|
+
startDate: V(w).startOf(h).format("YYYY-MM-DD"),
|
|
37
|
+
endDate: V(c).endOf(h).format("YYYY-MM-DD")
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return { dateRange: a, parsedDateRange: x, dateRangeLabel: _, setRange: D };
|
|
41
|
+
}
|
|
42
|
+
const Ke = {
|
|
43
|
+
class: "my-16 flex w-[350px] flex-col gap-40"
|
|
44
|
+
}, ze = {
|
|
45
|
+
class: "flex gap-16"
|
|
46
|
+
}, Be = {
|
|
47
|
+
class: "flex flex-col gap-4"
|
|
48
|
+
}, Ne = {
|
|
49
|
+
class: "fm-typo-body-md-400 text-fm-color-typo-secondary"
|
|
50
|
+
}, Ue = {
|
|
51
|
+
class: "fm-typo-body-md-700 text-fm-color-typo-primary"
|
|
52
|
+
}, Pe = {
|
|
53
|
+
class: "flex flex-col gap-8"
|
|
54
|
+
}, je = {
|
|
55
|
+
class: "fm-typo-body-xl-700"
|
|
56
|
+
}, He = {
|
|
57
|
+
class: "flex flex-col gap-24"
|
|
58
|
+
}, Ge = {
|
|
59
|
+
class: "flex flex-col gap-8"
|
|
60
|
+
}, qe = {
|
|
61
|
+
class: "fm-typo-body-xl-700"
|
|
62
|
+
}, Je = {
|
|
63
|
+
class: "flex flex-col gap-24"
|
|
64
|
+
}, Qe = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "fm-typo-body-sm-400 text-fm-color-typo-error mt-1 flex items-center gap-4"
|
|
67
|
+
}, We = {
|
|
68
|
+
class: "flex items-center justify-start gap-8"
|
|
69
|
+
}, Xe = {
|
|
70
|
+
class: "space-y-8"
|
|
71
|
+
}, Ze = {
|
|
72
|
+
class: "flex items-start gap-8 flex-wrap xs:px-16"
|
|
73
|
+
}, et = {
|
|
74
|
+
class: "flex items-center gap-8"
|
|
75
|
+
}, tt = {
|
|
76
|
+
class: "flex h-full flex-col overflow-auto"
|
|
77
|
+
}, at = /* @__PURE__ */ fe({
|
|
78
|
+
__name: "TimesheetList",
|
|
79
|
+
setup(b) {
|
|
80
|
+
const {
|
|
81
|
+
t: a
|
|
82
|
+
} = xe(), _ = De(), x = Me(_), D = [{
|
|
83
|
+
label: a("hr.timesheet.listView"),
|
|
84
|
+
value: "listView"
|
|
85
|
+
}, {
|
|
86
|
+
label: a("hr.timesheet.userView"),
|
|
87
|
+
value: "userView"
|
|
88
|
+
}], v = d("listView"), w = p(() => {
|
|
89
|
+
var e;
|
|
90
|
+
return (e = D.find((t) => t.value === v.value)) == null ? void 0 : e.label;
|
|
91
|
+
}), c = d(""), h = Ee(), S = Re(), V = $e(), C = p(() => S.employees.value), ae = p(() => new Map(C.value.map((e) => [e._id, e]))), oe = p(() => new Map(V.restaurants.value.map((e) => [e._id, e.profile.code]))), j = p(() => h.timesheets.value.filter((s) => !A.value || A.value.includes(s.restaurantId)).map((s) => {
|
|
92
|
+
const r = oe.value.get(s.restaurantId), g = ae.value.get(s.user.id);
|
|
93
|
+
return {
|
|
94
|
+
...s,
|
|
95
|
+
restaurantCode: r,
|
|
96
|
+
user: {
|
|
97
|
+
...s.user,
|
|
98
|
+
code: g ? g.code : ""
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
})), z = p(() => j.value.filter((e) => {
|
|
102
|
+
var t, s;
|
|
103
|
+
return e.user.name.toLowerCase().includes(c.value.toLowerCase()) || e.restaurantName.toLowerCase().includes(c.value.toLowerCase()) || ((t = e.restaurantCode) == null ? void 0 : t.toLowerCase().includes(c.value.toLowerCase())) || ((s = e.user.code) == null ? void 0 : s.toLowerCase().includes(c.value.toLowerCase()));
|
|
104
|
+
})), H = p(() => {
|
|
105
|
+
const e = Ye(j.value, (s) => s.user.name), t = Object.entries(e).map(([s, r]) => {
|
|
106
|
+
const g = C.value.find(($) => $._id === r[0].user.id);
|
|
107
|
+
return {
|
|
108
|
+
key: s,
|
|
109
|
+
user: r[0].user.name,
|
|
110
|
+
code: g ? g.code : r[0].user.code || "",
|
|
111
|
+
timesheets: r,
|
|
112
|
+
total: Te(r.reduce(($, k) => $ + k.totalMin, 0))
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
return Le(t, {
|
|
116
|
+
selector: "user"
|
|
117
|
+
});
|
|
118
|
+
}), B = p(() => H.value.filter((e) => {
|
|
119
|
+
var t;
|
|
120
|
+
return e.user.toLowerCase().includes(c.value.toLowerCase()) || ((t = e.code) == null ? void 0 : t.toLowerCase().includes(c.value.toLowerCase()));
|
|
121
|
+
})), F = d(!1), N = async () => {
|
|
122
|
+
const {
|
|
123
|
+
startDate: e,
|
|
124
|
+
endDate: t
|
|
125
|
+
} = M.value;
|
|
126
|
+
F.value = !0;
|
|
127
|
+
try {
|
|
128
|
+
await h.readTimesheet(new Date(e), new Date(t)), await _e(), U.value = Object.fromEntries(Object.entries(new Array(H.value.length).fill(!0)));
|
|
129
|
+
} catch (s) {
|
|
130
|
+
_.open({
|
|
131
|
+
title: s instanceof Error ? s.message : `${s}`,
|
|
132
|
+
type: "error"
|
|
133
|
+
});
|
|
134
|
+
} finally {
|
|
135
|
+
F.value = !1;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
he(async () => {
|
|
139
|
+
N();
|
|
140
|
+
try {
|
|
141
|
+
await V.readRestaurants(), S.employees.value.length === 0 && await S.readEmployees();
|
|
142
|
+
} catch (e) {
|
|
143
|
+
console.error("Failed to load timesheet dependencies:", e), _.open({
|
|
144
|
+
message: e instanceof Error ? e.message : String(e),
|
|
145
|
+
type: "error"
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
const A = d(), se = p(() => V.restaurants.value.filter((e) => e.managable).map((e) => ({
|
|
150
|
+
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
151
|
+
value: e._id
|
|
152
|
+
}))), {
|
|
153
|
+
dateRange: M,
|
|
154
|
+
dateRangeLabel: le,
|
|
155
|
+
setRange: G
|
|
156
|
+
} = Ae();
|
|
157
|
+
Z(M, async () => {
|
|
158
|
+
N();
|
|
159
|
+
});
|
|
160
|
+
const ne = [{
|
|
161
|
+
accessorKey: "user.code",
|
|
162
|
+
size: 100,
|
|
163
|
+
header: () => a("hr.employee.columns.code"),
|
|
164
|
+
cell: (e) => e.row.original.user.code || "--",
|
|
165
|
+
enableSorting: !0
|
|
166
|
+
}, {
|
|
167
|
+
accessorKey: "user",
|
|
168
|
+
header: () => a("hr.timesheet.columns.name"),
|
|
169
|
+
cell: (e) => e.row.original.user.name,
|
|
170
|
+
enableSorting: !1
|
|
171
|
+
}, {
|
|
172
|
+
accessorKey: "restaurantName",
|
|
173
|
+
header: () => a("hr.timesheet.columns.restaurant"),
|
|
174
|
+
cell: (e) => {
|
|
175
|
+
const t = e.row.original.restaurantCode, s = e.row.original.restaurantName;
|
|
176
|
+
return `${t ? t + " - " : ""}${s}`;
|
|
177
|
+
},
|
|
178
|
+
enableSorting: !0
|
|
179
|
+
}, {
|
|
180
|
+
accessorKey: "start",
|
|
181
|
+
header: () => a("hr.timesheet.columns.start"),
|
|
182
|
+
cell: (e) => e.row.original.start || "--",
|
|
183
|
+
enableSorting: !0
|
|
184
|
+
}, {
|
|
185
|
+
accessorKey: "end",
|
|
186
|
+
header: () => a("hr.timesheet.columns.end"),
|
|
187
|
+
cell: (e) => e.row.original.end || "--",
|
|
188
|
+
enableSorting: !0
|
|
189
|
+
}, {
|
|
190
|
+
name: "duration",
|
|
191
|
+
accessorKey: "duration",
|
|
192
|
+
header: () => a("hr.timesheet.columns.duration"),
|
|
193
|
+
cell: (e) => e.row.original.duration || "--",
|
|
194
|
+
enableSorting: !0
|
|
195
|
+
}], U = d({}), re = [{
|
|
196
|
+
accessorKey: "code",
|
|
197
|
+
size: 100,
|
|
198
|
+
header: () => a("hr.employee.columns.code"),
|
|
199
|
+
cell: (e) => e.row.original.code,
|
|
200
|
+
enableSorting: !1
|
|
201
|
+
}, {
|
|
202
|
+
accessorKey: "user",
|
|
203
|
+
header: () => a("hr.timesheet.columns.name"),
|
|
204
|
+
cell: (e) => {
|
|
205
|
+
const t = e.row.original;
|
|
206
|
+
if (typeof t.user == "string") {
|
|
207
|
+
const s = e.row.getIsExpanded();
|
|
208
|
+
return l("div", {
|
|
209
|
+
class: "flex items-center gap-8"
|
|
210
|
+
}, [l("div", {
|
|
211
|
+
onClick: (r) => {
|
|
212
|
+
r.stopPropagation(), e.row.getToggleExpandedHandler()(r);
|
|
213
|
+
}
|
|
214
|
+
}, [l(Se.FmButton, {
|
|
215
|
+
variant: "tertiary",
|
|
216
|
+
icon: s ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
217
|
+
}, null)]), t.user]);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
enableSorting: !1
|
|
221
|
+
}, {
|
|
222
|
+
accessorKey: "start",
|
|
223
|
+
header: () => a("hr.timesheet.columns.start"),
|
|
224
|
+
cell: (e) => {
|
|
225
|
+
const t = e.row.original;
|
|
226
|
+
return (t == null ? void 0 : t.start) || "--";
|
|
227
|
+
},
|
|
228
|
+
enableSorting: !1
|
|
229
|
+
}, {
|
|
230
|
+
accessorKey: "end",
|
|
231
|
+
header: () => a("hr.timesheet.columns.end"),
|
|
232
|
+
cell: (e) => {
|
|
233
|
+
const t = e.row.original;
|
|
234
|
+
return (t == null ? void 0 : t.end) || "--";
|
|
235
|
+
},
|
|
236
|
+
enableSorting: !1
|
|
237
|
+
}, {
|
|
238
|
+
name: "duration",
|
|
239
|
+
accessorKey: "duration",
|
|
240
|
+
header: () => a("hr.timesheet.columns.hourMinute"),
|
|
241
|
+
cell: (e) => {
|
|
242
|
+
const t = e.row.original;
|
|
243
|
+
return t.total ? `Total: ${t.total}` : t.duration;
|
|
244
|
+
},
|
|
245
|
+
enableSorting: !1
|
|
246
|
+
}], Y = d(!1);
|
|
247
|
+
function q(e) {
|
|
248
|
+
m.value = e, L.value = f(m.value.startedAt).format("YYYY-MM-DD"), I.value = f(m.value.endedAt || m.value.startedAt).format("YYYY-MM-DD"), T.value = f(m.value.startedAt).format("HH:mm"), R.value = f(m.value.endedAt || m.value.startedAt).format("HH:mm"), Y.value = !0;
|
|
249
|
+
}
|
|
250
|
+
const L = d(), T = d(), I = d(), R = d(), m = d(), K = d("");
|
|
251
|
+
async function ie() {
|
|
252
|
+
const e = J(L.value, T.value), t = J(I.value, R.value);
|
|
253
|
+
if (f(e).isAfter(t)) {
|
|
254
|
+
K.value = a("hr.timesheet.checkOutMustBeforeCheckIn");
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
x.minor(async () => {
|
|
258
|
+
await h.updateTimesheet(m.value, e, t);
|
|
259
|
+
}, {
|
|
260
|
+
successMessage: a("hr.timesheet.update.successMessage")
|
|
261
|
+
}), N(), Y.value = !1;
|
|
262
|
+
}
|
|
263
|
+
const J = (e, t) => f(e).set("h", parseInt(t.split(":")[0])).set("m", parseInt(t.split(":")[1])).toISOString();
|
|
264
|
+
return Z([L, I, T, R], ([e, t, s, r]) => {
|
|
265
|
+
(e || t || s || r) && (K.value = "");
|
|
266
|
+
}), (e, t) => {
|
|
267
|
+
const s = u("FmAvatar"), r = u("FmDatePicker"), g = u("FmTimePicker"), $ = u("FmIcon"), k = u("FmButton"), ue = u("FmSideSheet"), Q = u("FmChip"), de = u("FmDateRangePicker"), ce = u("FmMenuItem"), me = u("FmMenu"), pe = u("FmSpacer"), ve = u("FmSearch"), W = u("FmTable");
|
|
268
|
+
return E(), P(ee, null, [l(ue, {
|
|
269
|
+
modelValue: Y.value,
|
|
270
|
+
"onUpdate:modelValue": t[5] || (t[5] = (o) => Y.value = o),
|
|
271
|
+
"dismiss-away": "",
|
|
272
|
+
header: n(a)("hr.timesheet.update.title")
|
|
273
|
+
}, {
|
|
274
|
+
"side-sheet-footer": y(() => [i("div", We, [l(k, {
|
|
275
|
+
label: n(a)("common.update"),
|
|
276
|
+
size: "md",
|
|
277
|
+
variant: "primary",
|
|
278
|
+
onClick: ie
|
|
279
|
+
}, null, 8, ["label"]), l(k, {
|
|
280
|
+
label: n(a)("common.cancel"),
|
|
281
|
+
size: "md",
|
|
282
|
+
variant: "secondary",
|
|
283
|
+
onClick: t[4] || (t[4] = (o) => Y.value = !1)
|
|
284
|
+
}, null, 8, ["label"])])]),
|
|
285
|
+
default: y(() => [i("div", Ke, [i("div", ze, [l(s, {
|
|
286
|
+
name: m.value.user.name,
|
|
287
|
+
initials: n(Ie)(m.value.user.name),
|
|
288
|
+
size: "lg"
|
|
289
|
+
}, null, 8, ["name", "initials"]), i("div", Be, [i("div", Ne, O(n(a)("hr.timesheet.employeeName")), 1), i("div", Ue, O(m.value.user.name), 1)])]), i("div", Pe, [i("div", je, O(n(a)("hr.timesheet.update.checkIn")), 1), i("div", He, [l(r, {
|
|
290
|
+
modelValue: L.value,
|
|
291
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => L.value = o),
|
|
292
|
+
disabled: !1,
|
|
293
|
+
label: n(a)("hr.timesheet.update.date")
|
|
294
|
+
}, null, 8, ["modelValue", "label"]), l(g, {
|
|
295
|
+
modelValue: T.value,
|
|
296
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => T.value = o),
|
|
297
|
+
label: n(a)("hr.timesheet.update.time")
|
|
298
|
+
}, null, 8, ["modelValue", "label"])])]), i("div", Ge, [i("div", qe, O(n(a)("hr.timesheet.update.checkOut")), 1), i("div", Je, [l(r, {
|
|
299
|
+
modelValue: I.value,
|
|
300
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => I.value = o),
|
|
301
|
+
disabled: !1,
|
|
302
|
+
label: n(a)("hr.timesheet.update.date")
|
|
303
|
+
}, null, 8, ["modelValue", "label"]), l(g, {
|
|
304
|
+
modelValue: R.value,
|
|
305
|
+
"onUpdate:modelValue": t[3] || (t[3] = (o) => R.value = o),
|
|
306
|
+
label: n(a)("hr.timesheet.update.time")
|
|
307
|
+
}, null, 8, ["modelValue", "label"])])]), K.value ? (E(), P("div", Qe, [l($, {
|
|
308
|
+
color: "#FF3B30",
|
|
309
|
+
name: "error",
|
|
310
|
+
size: "sm"
|
|
311
|
+
}), we(" " + O(K.value), 1)])) : ge("", !0)])]),
|
|
312
|
+
_: 1
|
|
313
|
+
}, 8, ["modelValue", "header"]), i("div", Xe, [i("div", Ze, [l(Ve, {
|
|
314
|
+
modelValue: A.value,
|
|
315
|
+
"onUpdate:modelValue": t[6] || (t[6] = (o) => A.value = o),
|
|
316
|
+
multiple: "",
|
|
317
|
+
items: se.value,
|
|
318
|
+
variant: "dark",
|
|
319
|
+
"selected-prefix": n(a)("hr.role.columns.restaurants"),
|
|
320
|
+
placeholder: n(a)("hr.role.columns.restaurants"),
|
|
321
|
+
class: "!w-auto pt-[3px]"
|
|
322
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div", et, [l(de, {
|
|
323
|
+
modelValue: n(M),
|
|
324
|
+
"onUpdate:modelValue": t[7] || (t[7] = (o) => ye(M) ? M.value = o : null),
|
|
325
|
+
"show-predefined-range": ""
|
|
326
|
+
}, {
|
|
327
|
+
"trigger-button": y(() => [l(Q, {
|
|
328
|
+
label: n(le)
|
|
329
|
+
}, null, 8, ["label"])]),
|
|
330
|
+
_: 1
|
|
331
|
+
}, 8, ["modelValue"]), l(k, {
|
|
332
|
+
icon: "chevron_left",
|
|
333
|
+
variant: "tertiary",
|
|
334
|
+
onClick: t[8] || (t[8] = (o) => n(G)("subtract"))
|
|
335
|
+
}), l(k, {
|
|
336
|
+
icon: "chevron_right",
|
|
337
|
+
variant: "tertiary",
|
|
338
|
+
onClick: t[9] || (t[9] = (o) => n(G)("add"))
|
|
339
|
+
})]), l(me, {
|
|
340
|
+
class: "pt-[3px]"
|
|
341
|
+
}, {
|
|
342
|
+
"menu-button": y(() => [l(Q, {
|
|
343
|
+
label: w.value,
|
|
344
|
+
"right-icon": "keyboard_arrow_down"
|
|
345
|
+
}, null, 8, ["label"])]),
|
|
346
|
+
default: y(() => [(E(), P(ee, null, be(D, (o) => l(ce, {
|
|
347
|
+
key: o.value,
|
|
348
|
+
label: o.label,
|
|
349
|
+
onClick: (X) => v.value = o.value
|
|
350
|
+
}, null, 8, ["label", "onClick"])), 64))]),
|
|
351
|
+
_: 1
|
|
352
|
+
}), l(pe), l(ve, {
|
|
353
|
+
modelValue: c.value,
|
|
354
|
+
"onUpdate:modelValue": t[10] || (t[10] = (o) => c.value = o),
|
|
355
|
+
class: "w-[320px]",
|
|
356
|
+
placeholder: n(a)("hr.timesheet.search.placeholder")
|
|
357
|
+
}, null, 8, ["modelValue", "placeholder"])]), l(Ce, {
|
|
358
|
+
class: "w-full xs:px-16"
|
|
359
|
+
}, {
|
|
360
|
+
default: y(() => [i("div", tt, [l(Fe, {
|
|
361
|
+
"is-loading": F.value,
|
|
362
|
+
"is-empty": v.value === "listView" ? z.value.length === 0 : B.value.length === 0,
|
|
363
|
+
"collapse-at": !1,
|
|
364
|
+
title: n(a)("hr.timesheet.noData.title"),
|
|
365
|
+
subtitle: ""
|
|
366
|
+
}, {
|
|
367
|
+
default: y(() => [v.value === "listView" ? (E(), te(W, {
|
|
368
|
+
key: 0,
|
|
369
|
+
class: "min-w-[640px]",
|
|
370
|
+
"column-defs": ne,
|
|
371
|
+
"row-data": z.value,
|
|
372
|
+
"page-size": z.value.length,
|
|
373
|
+
loading: F.value,
|
|
374
|
+
"pin-header-row": "",
|
|
375
|
+
"hide-footer": "",
|
|
376
|
+
"shrink-at": !1,
|
|
377
|
+
onRowClick: t[11] || (t[11] = (o) => q(o.original))
|
|
378
|
+
}, null, 8, ["row-data", "page-size", "loading"])) : (E(), te(W, {
|
|
379
|
+
key: 1,
|
|
380
|
+
class: "min-w-[640px] timesheet-user-view",
|
|
381
|
+
"column-defs": re,
|
|
382
|
+
"row-data": B.value,
|
|
383
|
+
"page-size": B.value.reduce((o, X) => o + 1 + X.timesheets.length, 0),
|
|
384
|
+
loading: F.value,
|
|
385
|
+
"pin-header-row": "",
|
|
386
|
+
"shrink-at": !1,
|
|
387
|
+
"expanded-state": U.value,
|
|
388
|
+
"get-sub-row": (o) => o.timesheets,
|
|
389
|
+
"onUpdate:expandedState": t[12] || (t[12] = (o) => U.value = o),
|
|
390
|
+
onRowClick: t[13] || (t[13] = (o) => q(o.original))
|
|
391
|
+
}, null, 8, ["row-data", "page-size", "loading", "expanded-state", "get-sub-row"]))]),
|
|
392
|
+
_: 1
|
|
393
|
+
}, 8, ["is-loading", "is-empty", "title"])])]),
|
|
394
|
+
_: 1
|
|
395
|
+
})])], 64);
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
}), gt = /* @__PURE__ */ ke(at, [["__scopeId", "data-v-c98b0b84"]]);
|
|
399
|
+
export {
|
|
400
|
+
gt as default
|
|
401
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as i } from "./dayjs.min-
|
|
1
|
+
import { d as i } from "./dayjs.min-AoirQCgL.js";
|
|
2
2
|
import { defineStore as p, storeToRefs as T } from "pinia";
|
|
3
3
|
import { ref as l } from "vue";
|
|
4
|
-
import { b as c, g as y } from "./app-
|
|
5
|
-
import { s as S } from "./iteration-
|
|
4
|
+
import { b as c, g as y } from "./app-DOFDND9j.js";
|
|
5
|
+
import { s as S } from "./iteration-DmuDXP8U.js";
|
|
6
6
|
import { i as f, f as g } from "./utils-BZkjJbju.js";
|
|
7
7
|
const u = {
|
|
8
8
|
async readTimesheets(t, e) {
|