@feedmepos/mf-hrm-portal 2.1.0-dev → 2.1.0-dev.3
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/AuditLogList-C8VefmfL.js +1608 -0
- package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-tiuei7CA.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-B25U2YoL.js} +2 -2
- package/dist/EmployeeList-DDY8DxQr.js +884 -0
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
- package/dist/{Main-BgOhmojO.js → Main-BQ36wEVl.js} +188 -185
- package/dist/Main-D7xrzW8p.js +94 -0
- package/dist/{Main-D2Wf__wM.js → Main-D8zj09ZS.js} +1987 -1979
- package/dist/PermissionSetList-zdFnxyCb.js +392 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DOgOa3cu.js +4042 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-D-14ca2J.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DqY-OTuj.js} +1 -1
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
- package/dist/{RoleList-tSC8RJHe.js → RoleList-CRYU_eRb.js} +231 -221
- package/dist/SelectFilter-ATOm0hdn.js +269 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js} +54 -20
- package/dist/{TeamMemberList-Bz-kDJ0e.js → TeamMemberList-CMK7Yfn6.js} +137 -131
- package/dist/{TimesheetList-BFVhmcRt.js → TimesheetList-C00-tU7K.js} +140 -134
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CtHuL5tW.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-dT_CJJDV.js} +2 -2
- package/dist/{app-DRnSocX8.js → app-C-wWQrRY.js} +792 -475
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B8xOAypU.js → dayjs.min-Bk9YhjTx.js} +1 -1
- package/dist/{employee-UrXqUaik.js → employee-DzKKMXNo.js} +3 -3
- package/dist/{iteration-LEYoQKiI.js → iteration-BV93u72h.js} +1 -1
- package/dist/{lodash-Bq6_eZZ0.js → lodash-psyQLJ6h.js} +1 -1
- package/dist/{rule-CJC6Cq6S.js → rule-mNiIG4E8.js} +116 -110
- package/dist/src/api/audit-log/index.d.ts +23 -0
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
- package/dist/src/components/form/SelectFilter.vue.d.ts +3 -0
- package/dist/src/components/table/EmptyDataTemplate/index.vue.d.ts +4 -1
- package/dist/src/components/table/TableEmptyState.vue.d.ts +31 -0
- package/dist/src/stores/permission-set.d.ts +12 -3
- package/dist/src/stores/team.d.ts +4 -1
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/views/audit-log/event-line.d.ts +13 -0
- package/dist/src/views/audit-log/locales/index.d.ts +320 -16
- package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
- package/dist/src/views/hr/locales/index.d.ts +4 -0
- package/dist/src/views/team/locales/index.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BGsfYWAR.js → useAppStore-CEgLVGO6.js} +1 -1
- package/dist/useDebounce-B8ZPVS5C.js +15 -0
- package/dist/{useLoading-BUM5R2qV.js → useLoading-CJtXNU4d.js} +1 -1
- package/dist/{useReportPermissions-nlQ_BBL2.js → useReportPermissions-DoQyFUKj.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-C1bGND8z.js +0 -1037
- package/dist/EmployeeList-DqQF9xEx.js +0 -851
- package/dist/Main-DcKVuIjB.js +0 -90
- package/dist/PermissionSetList-CQpTa0eY.js +0 -384
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCKVpAwv.js +0 -4030
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/SelectFilter-DUj7GBtT.js +0 -251
- package/dist/useDebounce-CWb5QR9G.js +0 -28
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as d, computed as g, defineComponent as pe, onMounted as
|
|
2
|
-
import { d as v } from "./dayjs.min-
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { S as De, _ as Se } from "./SelectFilter-
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { u as Ce } from "./useLoading-
|
|
9
|
-
import { u as Fe, c as Ye, s as Le } from "./iteration-
|
|
1
|
+
import { ref as d, computed as g, defineComponent as pe, onMounted as fe, 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 b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
|
|
2
|
+
import { d as v } from "./dayjs.min-Bk9YhjTx.js";
|
|
3
|
+
import { useI18n as _e } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as be, components as xe } from "@feedmepos/ui-library";
|
|
5
|
+
import { S as De, _ as Se } from "./SelectFilter-ATOm0hdn.js";
|
|
6
|
+
import { _ as Ve } from "./app-C-wWQrRY.js";
|
|
7
|
+
import { _ as ke } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js";
|
|
8
|
+
import { u as Ce } from "./useLoading-CJtXNU4d.js";
|
|
9
|
+
import { u as Fe, c as Ye, s as Le } from "./iteration-BV93u72h.js";
|
|
10
10
|
import { f as Me } from "./utils-BZkjJbju.js";
|
|
11
|
-
import { u as Te } from "./employee-
|
|
12
|
-
import { u as Re } from "./TimesheetList.
|
|
11
|
+
import { u as Te } from "./employee-DzKKMXNo.js";
|
|
12
|
+
import { u as Re } from "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-dT_CJJDV.js";
|
|
13
13
|
function Ie(x, a) {
|
|
14
14
|
return ["years", "months"].find((S) => {
|
|
15
|
-
const
|
|
16
|
-
return x.isSame(
|
|
15
|
+
const V = x.startOf(S), m = x.endOf(S);
|
|
16
|
+
return x.isSame(V, "day") && a.isSame(m, "day");
|
|
17
17
|
}) || "days";
|
|
18
18
|
}
|
|
19
19
|
function $e() {
|
|
@@ -22,20 +22,20 @@ function $e() {
|
|
|
22
22
|
endDate: v().format("YYYY-MM-DD")
|
|
23
23
|
}, a = d(x), D = g(() => {
|
|
24
24
|
if (!a.value) return "No dates selected.";
|
|
25
|
-
const
|
|
26
|
-
return `${
|
|
25
|
+
const m = a.value.startDate ?? "Start", _ = a.value.endDate ?? "End";
|
|
26
|
+
return `${m} - ${_}`;
|
|
27
27
|
}), S = g(() => ({
|
|
28
28
|
startDate: new Date(a.value.startDate),
|
|
29
29
|
endDate: new Date(a.value.endDate)
|
|
30
30
|
}));
|
|
31
|
-
function
|
|
32
|
-
const
|
|
31
|
+
function V(m) {
|
|
32
|
+
const _ = v(a.value.startDate), c = v(a.value.endDate), h = Ie(_, c), k = h === "days" ? c.diff(_, "days") + 1 : 1, C = m === "subtract" ? (F) => F.subtract(k, h) : (F) => F.add(k, h);
|
|
33
33
|
a.value = {
|
|
34
|
-
startDate: C(
|
|
34
|
+
startDate: C(_).startOf(h).format("YYYY-MM-DD"),
|
|
35
35
|
endDate: C(c).endOf(h).format("YYYY-MM-DD")
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
return { dateRange: a, parsedDateRange: S, dateRangeLabel: D, setRange:
|
|
38
|
+
return { dateRange: a, parsedDateRange: S, dateRangeLabel: D, setRange: V };
|
|
39
39
|
}
|
|
40
40
|
const Ee = {
|
|
41
41
|
class: "my-16 flex w-[350px] flex-col gap-40"
|
|
@@ -70,57 +70,59 @@ const Ee = {
|
|
|
70
70
|
class: "flex items-start gap-8 flex-wrap xs:px-16"
|
|
71
71
|
}, We = {
|
|
72
72
|
class: "flex items-center gap-8"
|
|
73
|
-
}, Xe =
|
|
73
|
+
}, Xe = {
|
|
74
|
+
class: "flex h-full flex-col overflow-auto"
|
|
75
|
+
}, Ze = /* @__PURE__ */ pe({
|
|
74
76
|
__name: "TimesheetList",
|
|
75
77
|
setup(x) {
|
|
76
78
|
const {
|
|
77
79
|
t: a
|
|
78
|
-
} =
|
|
80
|
+
} = _e(), D = be(), S = Ce(D), V = [{
|
|
79
81
|
label: a("hr.timesheet.listView"),
|
|
80
82
|
value: "listView"
|
|
81
83
|
}, {
|
|
82
84
|
label: a("hr.timesheet.userView"),
|
|
83
85
|
value: "userView"
|
|
84
|
-
}],
|
|
86
|
+
}], m = d("listView"), _ = g(() => {
|
|
85
87
|
var t;
|
|
86
|
-
return (t =
|
|
87
|
-
}), c = d(""), h = Re(),
|
|
88
|
+
return (t = V.find((e) => e.value === m.value)) == null ? void 0 : t.label;
|
|
89
|
+
}), c = d(""), h = Re(), k = Te(), C = Fe(), F = g(() => k.employees.value), j = g(() => h.timesheets.value.filter((s) => !A.value || A.value.includes(s.restaurantId)).map((s) => {
|
|
88
90
|
var y;
|
|
89
|
-
const
|
|
91
|
+
const r = (y = C.restaurants.value.find((f) => f._id === s.restaurantId)) == null ? void 0 : y.profile.code, w = F.value.find((f) => f._id === s.user.id);
|
|
90
92
|
return {
|
|
91
93
|
...s,
|
|
92
|
-
restaurantCode:
|
|
94
|
+
restaurantCode: r,
|
|
93
95
|
user: {
|
|
94
96
|
...s.user,
|
|
95
97
|
code: w ? w.code : ""
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
|
-
})),
|
|
100
|
+
})), z = g(() => j.value.filter((t) => {
|
|
99
101
|
var e, s;
|
|
100
102
|
return t.user.name.toLowerCase().includes(c.value.toLowerCase()) || t.restaurantName.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.restaurantCode) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase())) || ((s = t.user.code) == null ? void 0 : s.toLowerCase().includes(c.value.toLowerCase()));
|
|
101
103
|
})), H = g(() => {
|
|
102
|
-
const t = Ye(
|
|
103
|
-
const w = F.value.find((y) => y._id ===
|
|
104
|
+
const t = Ye(j.value, (s) => s.user.name), e = Object.entries(t).map(([s, r]) => {
|
|
105
|
+
const w = F.value.find((y) => y._id === r[0].user.id);
|
|
104
106
|
return {
|
|
105
107
|
key: s,
|
|
106
|
-
user:
|
|
107
|
-
code: w ? w.code :
|
|
108
|
-
timesheets:
|
|
109
|
-
total: Me(
|
|
108
|
+
user: r[0].user.name,
|
|
109
|
+
code: w ? w.code : r[0].user.code || "",
|
|
110
|
+
timesheets: r,
|
|
111
|
+
total: Me(r.reduce((y, f) => y + f.totalMin, 0))
|
|
110
112
|
};
|
|
111
113
|
});
|
|
112
114
|
return Le(e, {
|
|
113
115
|
selector: "user"
|
|
114
116
|
});
|
|
115
|
-
}),
|
|
117
|
+
}), N = g(() => H.value.filter((t) => {
|
|
116
118
|
var e;
|
|
117
119
|
return t.user.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.code) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase()));
|
|
118
|
-
})),
|
|
120
|
+
})), Y = d(!1), U = async () => {
|
|
119
121
|
const {
|
|
120
122
|
startDate: t,
|
|
121
123
|
endDate: e
|
|
122
|
-
} =
|
|
123
|
-
|
|
124
|
+
} = L.value;
|
|
125
|
+
Y.value = !0;
|
|
124
126
|
try {
|
|
125
127
|
await h.readTimesheet(new Date(t), new Date(e)), await ye(), B.value = Object.fromEntries(Object.entries(new Array(H.value.length).fill(!0)));
|
|
126
128
|
} catch (s) {
|
|
@@ -129,12 +131,12 @@ const Ee = {
|
|
|
129
131
|
type: "error"
|
|
130
132
|
});
|
|
131
133
|
} finally {
|
|
132
|
-
|
|
134
|
+
Y.value = !1;
|
|
133
135
|
}
|
|
134
136
|
};
|
|
135
|
-
|
|
137
|
+
fe(async () => {
|
|
136
138
|
try {
|
|
137
|
-
await C.readRestaurants(),
|
|
139
|
+
await C.readRestaurants(), k.employees.value.length === 0 && await k.readEmployees();
|
|
138
140
|
} catch (t) {
|
|
139
141
|
console.error("Failed to load timesheet dependencies:", t), D.open({
|
|
140
142
|
message: t instanceof Error ? t.message : String(t),
|
|
@@ -147,11 +149,11 @@ const Ee = {
|
|
|
147
149
|
label: `${t.profile.code ? `${t.profile.code} - ` : ""}${t.profile.name}`,
|
|
148
150
|
value: t._id
|
|
149
151
|
}))), {
|
|
150
|
-
dateRange:
|
|
152
|
+
dateRange: L,
|
|
151
153
|
dateRangeLabel: oe,
|
|
152
|
-
setRange:
|
|
154
|
+
setRange: G
|
|
153
155
|
} = $e();
|
|
154
|
-
|
|
156
|
+
Z(L, async () => {
|
|
155
157
|
U();
|
|
156
158
|
});
|
|
157
159
|
const se = [{
|
|
@@ -205,8 +207,8 @@ const Ee = {
|
|
|
205
207
|
return l("div", {
|
|
206
208
|
class: "flex items-center gap-8"
|
|
207
209
|
}, [l("div", {
|
|
208
|
-
onClick: (
|
|
209
|
-
|
|
210
|
+
onClick: (r) => {
|
|
211
|
+
r.stopPropagation(), t.row.getToggleExpandedHandler()(r);
|
|
210
212
|
}
|
|
211
213
|
}, [l(xe.FmButton, {
|
|
212
214
|
variant: "tertiary",
|
|
@@ -240,71 +242,71 @@ const Ee = {
|
|
|
240
242
|
return e.total ? `Total: ${e.total}` : e.duration;
|
|
241
243
|
},
|
|
242
244
|
enableSorting: !1
|
|
243
|
-
}],
|
|
244
|
-
function
|
|
245
|
-
|
|
245
|
+
}], M = d(!1);
|
|
246
|
+
function q(t) {
|
|
247
|
+
p.value = t, T.value = v(p.value.startedAt).format("YYYY-MM-DD"), I.value = v(p.value.endedAt || p.value.startedAt).format("YYYY-MM-DD"), R.value = v(p.value.startedAt).format("HH:mm"), $.value = v(p.value.endedAt || p.value.startedAt).format("HH:mm"), M.value = !0;
|
|
246
248
|
}
|
|
247
|
-
const
|
|
248
|
-
async function
|
|
249
|
-
const t =
|
|
249
|
+
const T = d(), R = d(), I = d(), $ = d(), p = d(), K = d("");
|
|
250
|
+
async function ne() {
|
|
251
|
+
const t = J(T.value, R.value), e = J(I.value, $.value);
|
|
250
252
|
if (v(t).isAfter(e)) {
|
|
251
253
|
K.value = a("hr.timesheet.checkOutMustBeforeCheckIn");
|
|
252
254
|
return;
|
|
253
255
|
}
|
|
254
256
|
S.minor(async () => {
|
|
255
|
-
await h.updateTimesheet(
|
|
257
|
+
await h.updateTimesheet(p.value, t, e);
|
|
256
258
|
}, {
|
|
257
259
|
successMessage: a("hr.timesheet.update.successMessage")
|
|
258
|
-
}), U(),
|
|
260
|
+
}), U(), M.value = !1;
|
|
259
261
|
}
|
|
260
|
-
const
|
|
261
|
-
return
|
|
262
|
-
(t || e || s ||
|
|
262
|
+
const J = (t, e) => v(t).set("h", parseInt(e.split(":")[0])).set("m", parseInt(e.split(":")[1])).toISOString();
|
|
263
|
+
return Z([T, I, R, $], ([t, e, s, r]) => {
|
|
264
|
+
(t || e || s || r) && (K.value = "");
|
|
263
265
|
}), (t, e) => {
|
|
264
|
-
const s = u("FmAvatar"),
|
|
265
|
-
return
|
|
266
|
-
modelValue:
|
|
267
|
-
"onUpdate:modelValue": e[5] || (e[5] = (o) =>
|
|
266
|
+
const s = u("FmAvatar"), r = u("FmDatePicker"), w = u("FmTimePicker"), y = u("FmIcon"), f = u("FmButton"), re = u("FmSideSheet"), Q = u("FmChip"), ie = u("FmDateRangePicker"), ue = u("FmMenuItem"), de = u("FmMenu"), ce = u("FmSpacer"), me = u("FmSearch"), W = u("FmTable");
|
|
267
|
+
return E(), P(ee, null, [l(re, {
|
|
268
|
+
modelValue: M.value,
|
|
269
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => M.value = o),
|
|
268
270
|
"dismiss-away": "",
|
|
269
|
-
header:
|
|
271
|
+
header: n(a)("hr.timesheet.update.title")
|
|
270
272
|
}, {
|
|
271
|
-
"side-sheet-footer":
|
|
272
|
-
label:
|
|
273
|
+
"side-sheet-footer": b(() => [i("div", qe, [l(f, {
|
|
274
|
+
label: n(a)("common.update"),
|
|
273
275
|
size: "md",
|
|
274
276
|
variant: "primary",
|
|
275
|
-
onClick:
|
|
276
|
-
}, null, 8, ["label"]), l(
|
|
277
|
-
label:
|
|
277
|
+
onClick: ne
|
|
278
|
+
}, null, 8, ["label"]), l(f, {
|
|
279
|
+
label: n(a)("common.cancel"),
|
|
278
280
|
size: "md",
|
|
279
281
|
variant: "secondary",
|
|
280
|
-
onClick: e[4] || (e[4] = (o) =>
|
|
282
|
+
onClick: e[4] || (e[4] = (o) => M.value = !1)
|
|
281
283
|
}, null, 8, ["label"])])]),
|
|
282
|
-
default:
|
|
283
|
-
|
|
284
|
+
default: b(() => [i("div", Ee, [i("div", Oe, [l(s, {
|
|
285
|
+
name: p.value.user.name,
|
|
284
286
|
size: "lg"
|
|
285
|
-
}, null, 8, ["
|
|
286
|
-
modelValue:
|
|
287
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) =>
|
|
287
|
+
}, null, 8, ["name"]), i("div", Ae, [i("div", Ke, O(n(a)("hr.timesheet.employeeName")), 1), i("div", ze, O(p.value.user.name), 1)])]), i("div", Ne, [i("div", Ue, O(n(a)("hr.timesheet.update.checkIn")), 1), i("div", Be, [l(r, {
|
|
288
|
+
modelValue: T.value,
|
|
289
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => T.value = o),
|
|
288
290
|
disabled: !1,
|
|
289
|
-
label:
|
|
291
|
+
label: n(a)("hr.timesheet.update.date")
|
|
290
292
|
}, null, 8, ["modelValue", "label"]), l(w, {
|
|
293
|
+
modelValue: R.value,
|
|
294
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => R.value = o),
|
|
295
|
+
label: n(a)("hr.timesheet.update.time")
|
|
296
|
+
}, null, 8, ["modelValue", "label"])])]), i("div", Pe, [i("div", je, O(n(a)("hr.timesheet.update.checkOut")), 1), i("div", He, [l(r, {
|
|
291
297
|
modelValue: I.value,
|
|
292
|
-
"onUpdate:modelValue": e[
|
|
293
|
-
label: r(a)("hr.timesheet.update.time")
|
|
294
|
-
}, null, 8, ["modelValue", "label"])])]), i("div", Pe, [i("div", je, O(r(a)("hr.timesheet.update.checkOut")), 1), i("div", He, [l(n, {
|
|
295
|
-
modelValue: $.value,
|
|
296
|
-
"onUpdate:modelValue": e[2] || (e[2] = (o) => $.value = o),
|
|
298
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => I.value = o),
|
|
297
299
|
disabled: !1,
|
|
298
|
-
label:
|
|
300
|
+
label: n(a)("hr.timesheet.update.date")
|
|
299
301
|
}, null, 8, ["modelValue", "label"]), l(w, {
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue": e[3] || (e[3] = (o) =>
|
|
302
|
-
label:
|
|
303
|
-
}, null, 8, ["modelValue", "label"])])]), K.value ? (
|
|
302
|
+
modelValue: $.value,
|
|
303
|
+
"onUpdate:modelValue": e[3] || (e[3] = (o) => $.value = o),
|
|
304
|
+
label: n(a)("hr.timesheet.update.time")
|
|
305
|
+
}, null, 8, ["modelValue", "label"])])]), K.value ? (E(), P("div", Ge, [l(y, {
|
|
304
306
|
color: "#FF3B30",
|
|
305
307
|
name: "error",
|
|
306
308
|
size: "sm"
|
|
307
|
-
}), he(" " + O(K.value), 1)])) :
|
|
309
|
+
}), he(" " + O(K.value), 1)])) : ve("", !0)])]),
|
|
308
310
|
_: 1
|
|
309
311
|
}, 8, ["modelValue", "header"]), i("div", Je, [i("div", Qe, [l(De, {
|
|
310
312
|
modelValue: A.value,
|
|
@@ -312,82 +314,86 @@ const Ee = {
|
|
|
312
314
|
multiple: "",
|
|
313
315
|
items: ae.value,
|
|
314
316
|
variant: "dark",
|
|
315
|
-
"selected-prefix":
|
|
316
|
-
placeholder:
|
|
317
|
+
"selected-prefix": n(a)("hr.role.columns.restaurants"),
|
|
318
|
+
placeholder: n(a)("hr.role.columns.restaurants"),
|
|
317
319
|
class: "!w-auto pt-[3px]"
|
|
318
320
|
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div", We, [l(ie, {
|
|
319
|
-
modelValue:
|
|
320
|
-
"onUpdate:modelValue": e[7] || (e[7] = (o) => ge(
|
|
321
|
+
modelValue: n(L),
|
|
322
|
+
"onUpdate:modelValue": e[7] || (e[7] = (o) => ge(L) ? L.value = o : null),
|
|
321
323
|
"show-predefined-range": ""
|
|
322
324
|
}, {
|
|
323
|
-
"trigger-button":
|
|
324
|
-
label:
|
|
325
|
+
"trigger-button": b(() => [l(Q, {
|
|
326
|
+
label: n(oe)
|
|
325
327
|
}, null, 8, ["label"])]),
|
|
326
328
|
_: 1
|
|
327
|
-
}, 8, ["modelValue"]), l(
|
|
329
|
+
}, 8, ["modelValue"]), l(f, {
|
|
328
330
|
icon: "chevron_left",
|
|
329
331
|
variant: "tertiary",
|
|
330
|
-
onClick: e[8] || (e[8] = (o) =>
|
|
331
|
-
}), l(
|
|
332
|
+
onClick: e[8] || (e[8] = (o) => n(G)("subtract"))
|
|
333
|
+
}), l(f, {
|
|
332
334
|
icon: "chevron_right",
|
|
333
335
|
variant: "tertiary",
|
|
334
|
-
onClick: e[9] || (e[9] = (o) =>
|
|
336
|
+
onClick: e[9] || (e[9] = (o) => n(G)("add"))
|
|
335
337
|
})]), l(de, {
|
|
336
338
|
class: "pt-[3px]"
|
|
337
339
|
}, {
|
|
338
|
-
"menu-button":
|
|
339
|
-
label:
|
|
340
|
+
"menu-button": b(() => [l(Q, {
|
|
341
|
+
label: _.value,
|
|
340
342
|
"right-icon": "keyboard_arrow_down"
|
|
341
343
|
}, null, 8, ["label"])]),
|
|
342
|
-
default:
|
|
344
|
+
default: b(() => [(E(), P(ee, null, we(V, (o) => l(ue, {
|
|
343
345
|
key: o.value,
|
|
344
346
|
label: o.label,
|
|
345
|
-
onClick: (
|
|
347
|
+
onClick: (X) => m.value = o.value
|
|
346
348
|
}, null, 8, ["label", "onClick"])), 64))]),
|
|
347
349
|
_: 1
|
|
348
350
|
}), l(ce), l(me, {
|
|
349
351
|
modelValue: c.value,
|
|
350
352
|
"onUpdate:modelValue": e[10] || (e[10] = (o) => c.value = o),
|
|
351
353
|
class: "w-[320px]",
|
|
352
|
-
placeholder:
|
|
353
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
354
|
-
|
|
355
|
-
title: r(a)("hr.timesheet.noData.title"),
|
|
356
|
-
subtitle: ""
|
|
357
|
-
}, null, 8, ["title"])) : (_(), z(ke, {
|
|
358
|
-
key: 1,
|
|
359
|
-
class: "w-full xs:px-16 overflow-auto"
|
|
354
|
+
placeholder: n(a)("hr.timesheet.search.placeholder")
|
|
355
|
+
}, null, 8, ["modelValue", "placeholder"])]), l(Ve, {
|
|
356
|
+
class: "w-full xs:px-16"
|
|
360
357
|
}, {
|
|
361
|
-
default:
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"
|
|
365
|
-
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
358
|
+
default: b(() => [i("div", Xe, [l(ke, {
|
|
359
|
+
"is-loading": Y.value,
|
|
360
|
+
"is-empty": m.value === "listView" ? z.value.length === 0 : N.value.length === 0,
|
|
361
|
+
"collapse-at": !1,
|
|
362
|
+
title: n(a)("hr.timesheet.noData.title"),
|
|
363
|
+
subtitle: ""
|
|
364
|
+
}, {
|
|
365
|
+
default: b(() => [m.value === "listView" ? (E(), te(W, {
|
|
366
|
+
key: 0,
|
|
367
|
+
class: "min-w-[640px]",
|
|
368
|
+
"column-defs": se,
|
|
369
|
+
"row-data": z.value,
|
|
370
|
+
"page-size": z.value.length,
|
|
371
|
+
loading: Y.value,
|
|
372
|
+
"pin-header-row": "",
|
|
373
|
+
"hide-footer": "",
|
|
374
|
+
"shrink-at": !1,
|
|
375
|
+
onRowClick: e[11] || (e[11] = (o) => q(o.original))
|
|
376
|
+
}, null, 8, ["row-data", "page-size", "loading"])) : (E(), te(W, {
|
|
377
|
+
key: 1,
|
|
378
|
+
class: "min-w-[640px] timesheet-user-view",
|
|
379
|
+
"column-defs": le,
|
|
380
|
+
"row-data": N.value,
|
|
381
|
+
"page-size": N.value.reduce((o, X) => o + 1 + X.timesheets.length, 0),
|
|
382
|
+
loading: Y.value,
|
|
383
|
+
"pin-header-row": "",
|
|
384
|
+
"shrink-at": !1,
|
|
385
|
+
"expanded-state": B.value,
|
|
386
|
+
"get-sub-row": (o) => o.timesheets,
|
|
387
|
+
"onUpdate:expandedState": e[12] || (e[12] = (o) => B.value = o),
|
|
388
|
+
onRowClick: e[13] || (e[13] = (o) => q(o.original))
|
|
389
|
+
}, null, 8, ["row-data", "page-size", "loading", "expanded-state", "get-sub-row"]))]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, ["is-loading", "is-empty", "title"])])]),
|
|
386
392
|
_: 1
|
|
387
|
-
})
|
|
393
|
+
})])], 64);
|
|
388
394
|
};
|
|
389
395
|
}
|
|
390
|
-
}),
|
|
396
|
+
}), mt = /* @__PURE__ */ Se(Ze, [["__scopeId", "data-v-2c7a177a"]]);
|
|
391
397
|
export {
|
|
392
|
-
|
|
398
|
+
mt as default
|
|
393
399
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as i } from "./dayjs.min-
|
|
1
|
+
import { d as i } from "./dayjs.min-Bk9YhjTx.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, s as S } from "./iteration-
|
|
4
|
+
import { b as c, g as y, s as S } from "./iteration-BV93u72h.js";
|
|
5
5
|
import { i as f, f as g } from "./utils-BZkjJbju.js";
|
|
6
6
|
const u = {
|
|
7
7
|
async readTimesheets(t, e) {
|