@feedmepos/mf-hrm-portal 2.0.8-dev.1 → 2.0.8-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.
- package/dist/AuditLogList-CNrMFE7u.js +708 -0
- package/dist/{EmployeeList-DuRlCrqN.js → EmployeeList-cOmlbt40.js} +5 -5
- package/dist/{Main-BfDH3uAt.js → Main-BDXOkOE2.js} +9 -9
- package/dist/{Main-QpKV1hdj.js → Main-BJh3lH16.js} +4 -4
- package/dist/{Main-D4ueBOl0.js → Main-C3koRp1u.js} +6 -6
- package/dist/{PermissionSetList-DfAZmUkI.js → PermissionSetList-CLJn0V0J.js} +5 -5
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bcr-EX6B.js +3471 -0
- package/dist/{RoleList-D4mup6LW.js → RoleList-Bd3v0EoJ.js} +7 -7
- package/dist/{TeamMemberList-D9rTKS5N.js → TeamMemberList-CbfbIqYV.js} +8 -8
- package/dist/{TimesheetList-CBudjg1y.js → TimesheetList-DkJWAHEN.js} +7 -7
- package/dist/{app-BO9lM0sJ.js → app-CBCdQFuQ.js} +683 -503
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-lY-LRZuh.js → dayjs.min-D-dyRkoG.js} +1 -1
- package/dist/{employee-DXp_u8jd.js → employee-BUIgpjQN.js} +4 -4
- package/dist/{index-BigKo-lS.js → index-BMJS_Lkf.js} +1 -1
- package/dist/{index-DAuOIotV.js → index-CPrEayXj.js} +2 -2
- package/dist/{iteration-DgaP-HFg.js → iteration-CsLWDBUl.js} +1 -1
- package/dist/{lodash-Mhrrz947.js → lodash-B9IFDgiG.js} +1 -1
- package/dist/src/composables/useBasePermission.d.ts +37 -0
- package/dist/src/helpers/permission-sync.d.ts +12 -0
- package/dist/src/views/audit-log/locales/index.d.ts +140 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{team-oeTIbsa-.js → team-6mA14lfK.js} +1 -1
- package/dist/{timesheet-B4XO3Kjx.js → timesheet-DG2p1hTy.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Cu5QCTlx.js → useAppStore-CmUOIsdB.js} +1 -1
- package/dist/{useLoading-DKnxkHGF.js → useLoading-Ct9N6Ir6.js} +1 -1
- package/dist/{useReportPermissions-B_w5FiAK.js → useReportPermissions-D_KEL6RC.js} +3 -3
- package/package.json +2 -2
- package/dist/AuditLogList-YGP3G14A.js +0 -493
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DokyDyxJ.js +0 -3432
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isRef as mt, ref as T, shallowRef as dt, watchEffect as he, computed as ie, h as fe, defineComponent as
|
|
1
|
+
import { isRef as mt, ref as T, shallowRef as dt, watchEffect as he, computed as ie, h as fe, defineComponent as z, createBlock as $, renderSlot as Ye, createCommentVNode as Bt, unref as Z, openBlock as W, createElementBlock as Ge, createElementVNode as O, toDisplayString as we, watch as De, nextTick as Me, onMounted as Ve, onBeforeUnmount as pt, normalizeStyle as bt, resolveComponent as le, withCtx as ft, createVNode as wt, defineAsyncComponent as Dt } from "vue";
|
|
2
2
|
import { useBreakpoints as Mt } from "@feedmepos/ui-library";
|
|
3
|
-
import { useRoute as vt, useRouter as
|
|
3
|
+
import { useRoute as vt, useRouter as yt } from "vue-router";
|
|
4
4
|
import { useCoreStore as ue, useI18n as je } from "@feedmepos/mf-common";
|
|
5
5
|
const Ee = {
|
|
6
6
|
title: "Audit Log",
|
|
7
|
+
export: "Export",
|
|
7
8
|
dateRange: {
|
|
8
9
|
placeholder: "Select date range"
|
|
9
10
|
},
|
|
@@ -27,14 +28,17 @@ const Ee = {
|
|
|
27
28
|
delete: "Delete"
|
|
28
29
|
},
|
|
29
30
|
columns: {
|
|
30
|
-
timestamp: "
|
|
31
|
+
timestamp: "Date",
|
|
31
32
|
user: "User",
|
|
33
|
+
role: "Role",
|
|
32
34
|
subject: "Subject",
|
|
33
35
|
action: "Action",
|
|
34
36
|
operation: "Operation",
|
|
35
37
|
outcome: "Status"
|
|
36
38
|
},
|
|
37
39
|
outcome: {
|
|
40
|
+
success: "Success",
|
|
41
|
+
failed: "Failed",
|
|
38
42
|
allowed: "Allowed",
|
|
39
43
|
denied: "Denied",
|
|
40
44
|
skipped: "Skipped"
|
|
@@ -48,21 +52,52 @@ const Ee = {
|
|
|
48
52
|
prevPage: "Previous page",
|
|
49
53
|
nextPage: "Next page"
|
|
50
54
|
},
|
|
55
|
+
exportSettings: {
|
|
56
|
+
title: "Export Columns"
|
|
57
|
+
},
|
|
58
|
+
exportFields: {
|
|
59
|
+
timestamp: "Date",
|
|
60
|
+
userName: "User Name",
|
|
61
|
+
userPhone: "Phone",
|
|
62
|
+
subject: "Role",
|
|
63
|
+
action: "Action",
|
|
64
|
+
operation: "Operation",
|
|
65
|
+
outcome: "Status",
|
|
66
|
+
businessId: "Business ID",
|
|
67
|
+
restaurantId: "Restaurant ID",
|
|
68
|
+
country: "Country",
|
|
69
|
+
resolvedFrom: "Resolved From",
|
|
70
|
+
requestMethod: "Request Method",
|
|
71
|
+
requestPath: "Request Path"
|
|
72
|
+
},
|
|
51
73
|
detail: {
|
|
52
74
|
header: "Audit Log Detail",
|
|
75
|
+
date: "Date",
|
|
53
76
|
timestamp: "Timestamp",
|
|
54
77
|
user: "User",
|
|
55
78
|
email: "E-mail",
|
|
56
79
|
action: "Action",
|
|
57
80
|
operation: "Operation",
|
|
81
|
+
role: "Role",
|
|
58
82
|
subject: "Subject",
|
|
59
83
|
field: "Field",
|
|
60
84
|
outcome: "Outcome",
|
|
61
85
|
business: "Business",
|
|
62
86
|
restaurant: "Restaurant",
|
|
87
|
+
changeDetails: "Change Details",
|
|
88
|
+
eventType: "Event Type",
|
|
63
89
|
metadata: "Metadata",
|
|
64
90
|
reason: "Reason",
|
|
65
91
|
resolvedFrom: "Resolved From",
|
|
92
|
+
resolvedFromValue: {
|
|
93
|
+
admin: "Admin",
|
|
94
|
+
staff: "Staff",
|
|
95
|
+
permissionSet: "Permission Set",
|
|
96
|
+
systemPermissionSet: "System Permission Set",
|
|
97
|
+
custom: "Custom",
|
|
98
|
+
noMatch: "No Match",
|
|
99
|
+
unknown: "Unknown"
|
|
100
|
+
},
|
|
66
101
|
permissionSet: "Permission Set",
|
|
67
102
|
permissionTrace: "Permission Trace",
|
|
68
103
|
decisivePermission: "Required rule",
|
|
@@ -71,14 +106,15 @@ const Ee = {
|
|
|
71
106
|
requestPath: "Request Path",
|
|
72
107
|
requestBody: "Request Body"
|
|
73
108
|
}
|
|
74
|
-
},
|
|
109
|
+
}, Ct = {
|
|
75
110
|
auditLog: Ee
|
|
76
111
|
}, ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
77
112
|
__proto__: null,
|
|
78
113
|
auditLog: Ee,
|
|
79
|
-
default:
|
|
114
|
+
default: Ct
|
|
80
115
|
}, Symbol.toStringTag, { value: "Module" })), xe = {
|
|
81
116
|
title: "บันทึกการตรวจสอบ",
|
|
117
|
+
export: "ส่งออก",
|
|
82
118
|
dateRange: {
|
|
83
119
|
placeholder: "เลือกช่วงวันที่"
|
|
84
120
|
},
|
|
@@ -102,14 +138,17 @@ const Ee = {
|
|
|
102
138
|
delete: "ลบ"
|
|
103
139
|
},
|
|
104
140
|
columns: {
|
|
105
|
-
timestamp: "
|
|
141
|
+
timestamp: "วันที่",
|
|
106
142
|
user: "ผู้ใช้",
|
|
143
|
+
role: "บทบาท",
|
|
107
144
|
subject: "หัวข้อ",
|
|
108
145
|
action: "การกระทำ",
|
|
109
146
|
operation: "รายละเอียดการดำเนินการ",
|
|
110
147
|
outcome: "สถานะ"
|
|
111
148
|
},
|
|
112
149
|
outcome: {
|
|
150
|
+
success: "สำเร็จ",
|
|
151
|
+
failed: "ล้มเหลว",
|
|
113
152
|
allowed: "อนุญาต",
|
|
114
153
|
denied: "ปฏิเสธ",
|
|
115
154
|
skipped: "ข้ามไป"
|
|
@@ -123,21 +162,52 @@ const Ee = {
|
|
|
123
162
|
prevPage: "หน้าก่อนหน้า",
|
|
124
163
|
nextPage: "หน้าถัดไป"
|
|
125
164
|
},
|
|
165
|
+
exportSettings: {
|
|
166
|
+
title: "เลือกคอลัมน์ที่ส่งออก"
|
|
167
|
+
},
|
|
168
|
+
exportFields: {
|
|
169
|
+
timestamp: "วันที่",
|
|
170
|
+
userName: "ชื่อผู้ใช้",
|
|
171
|
+
userPhone: "เบอร์โทรศัพท์",
|
|
172
|
+
subject: "บทบาท",
|
|
173
|
+
action: "การกระทำ",
|
|
174
|
+
operation: "รายละเอียดการดำเนินการ",
|
|
175
|
+
outcome: "สถานะ",
|
|
176
|
+
businessId: "รหัสธุรกิจ",
|
|
177
|
+
restaurantId: "รหัสร้านอาหาร",
|
|
178
|
+
country: "ประเทศ",
|
|
179
|
+
resolvedFrom: "แก้ไขจาก",
|
|
180
|
+
requestMethod: "วิธีการร้องขอ",
|
|
181
|
+
requestPath: "เส้นทางร้องขอ"
|
|
182
|
+
},
|
|
126
183
|
detail: {
|
|
127
184
|
header: "รายละเอียดบันทึกการตรวจสอบ",
|
|
185
|
+
date: "วันที่",
|
|
128
186
|
timestamp: "เวลา",
|
|
129
187
|
user: "ผู้ใช้",
|
|
130
188
|
email: "อีเมล",
|
|
131
189
|
action: "การกระทำ",
|
|
132
190
|
operation: "รายละเอียดการดำเนินการ",
|
|
191
|
+
role: "บทบาท",
|
|
133
192
|
subject: "หัวข้อ",
|
|
134
193
|
field: "ฟิลด์",
|
|
135
194
|
outcome: "ผลลัพธ์",
|
|
136
195
|
business: "ธุรกิจ",
|
|
137
196
|
restaurant: "ร้านอาหาร",
|
|
197
|
+
changeDetails: "รายละเอียดการเปลี่ยนแปลง",
|
|
198
|
+
eventType: "ประเภทเหตุการณ์",
|
|
138
199
|
metadata: "ข้อมูลเมตา",
|
|
139
200
|
reason: "เหตุผล",
|
|
140
201
|
resolvedFrom: "แก้ไขจาก",
|
|
202
|
+
resolvedFromValue: {
|
|
203
|
+
admin: "ผู้ดูแลระบบ",
|
|
204
|
+
staff: "พนักงาน",
|
|
205
|
+
permissionSet: "ชุดสิทธิ์",
|
|
206
|
+
systemPermissionSet: "ชุดสิทธิ์ระบบ",
|
|
207
|
+
custom: "กำหนดเอง",
|
|
208
|
+
noMatch: "ไม่พบรายการที่ตรงกัน",
|
|
209
|
+
unknown: "ไม่ทราบ"
|
|
210
|
+
},
|
|
141
211
|
permissionSet: "ชุดสิทธิ์",
|
|
142
212
|
permissionTrace: "เส้นทางสิทธิ์",
|
|
143
213
|
decisivePermission: "กฎที่จำเป็น",
|
|
@@ -147,14 +217,15 @@ const Ee = {
|
|
|
147
217
|
requestPath: "เส้นทางร้องขอ",
|
|
148
218
|
requestBody: "เนื้อหาคำขอ"
|
|
149
219
|
}
|
|
150
|
-
},
|
|
220
|
+
}, Yt = {
|
|
151
221
|
auditLog: xe
|
|
152
|
-
},
|
|
222
|
+
}, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
153
223
|
__proto__: null,
|
|
154
224
|
auditLog: xe,
|
|
155
|
-
default:
|
|
225
|
+
default: Yt
|
|
156
226
|
}, Symbol.toStringTag, { value: "Module" })), qe = {
|
|
157
227
|
title: "审计日志",
|
|
228
|
+
export: "导出",
|
|
158
229
|
dateRange: {
|
|
159
230
|
placeholder: "选择日期范围"
|
|
160
231
|
},
|
|
@@ -178,14 +249,17 @@ const Ee = {
|
|
|
178
249
|
delete: "删除"
|
|
179
250
|
},
|
|
180
251
|
columns: {
|
|
181
|
-
timestamp: "
|
|
252
|
+
timestamp: "日期",
|
|
182
253
|
user: "用户",
|
|
254
|
+
role: "角色",
|
|
183
255
|
subject: "主题",
|
|
184
256
|
action: "操作",
|
|
185
257
|
operation: "操作说明",
|
|
186
258
|
outcome: "状态"
|
|
187
259
|
},
|
|
188
260
|
outcome: {
|
|
261
|
+
success: "成功",
|
|
262
|
+
failed: "失败",
|
|
189
263
|
allowed: "允许",
|
|
190
264
|
denied: "拒绝",
|
|
191
265
|
skipped: "已跳过"
|
|
@@ -199,21 +273,52 @@ const Ee = {
|
|
|
199
273
|
prevPage: "上一页",
|
|
200
274
|
nextPage: "下一页"
|
|
201
275
|
},
|
|
276
|
+
exportSettings: {
|
|
277
|
+
title: "导出列"
|
|
278
|
+
},
|
|
279
|
+
exportFields: {
|
|
280
|
+
timestamp: "日期",
|
|
281
|
+
userName: "用户名",
|
|
282
|
+
userPhone: "手机号",
|
|
283
|
+
subject: "角色",
|
|
284
|
+
action: "操作",
|
|
285
|
+
operation: "操作说明",
|
|
286
|
+
outcome: "状态",
|
|
287
|
+
businessId: "商家 ID",
|
|
288
|
+
restaurantId: "餐厅 ID",
|
|
289
|
+
country: "国家",
|
|
290
|
+
resolvedFrom: "解析来源",
|
|
291
|
+
requestMethod: "请求方法",
|
|
292
|
+
requestPath: "请求路径"
|
|
293
|
+
},
|
|
202
294
|
detail: {
|
|
203
295
|
header: "审计日志详情",
|
|
296
|
+
date: "日期",
|
|
204
297
|
timestamp: "时间戳",
|
|
205
298
|
user: "用户",
|
|
206
299
|
email: "邮箱",
|
|
207
300
|
action: "操作",
|
|
208
301
|
operation: "操作说明",
|
|
302
|
+
role: "角色",
|
|
209
303
|
subject: "主题",
|
|
210
304
|
field: "字段",
|
|
211
305
|
outcome: "结果",
|
|
212
306
|
business: "商家",
|
|
213
307
|
restaurant: "餐厅",
|
|
308
|
+
changeDetails: "变更详情",
|
|
309
|
+
eventType: "事件类型",
|
|
214
310
|
metadata: "元数据",
|
|
215
311
|
reason: "原因",
|
|
216
312
|
resolvedFrom: "解析来源",
|
|
313
|
+
resolvedFromValue: {
|
|
314
|
+
admin: "管理员",
|
|
315
|
+
staff: "员工",
|
|
316
|
+
permissionSet: "权限集",
|
|
317
|
+
systemPermissionSet: "系统权限集",
|
|
318
|
+
custom: "自定义",
|
|
319
|
+
noMatch: "无匹配",
|
|
320
|
+
unknown: "未知"
|
|
321
|
+
},
|
|
217
322
|
permissionSet: "权限集",
|
|
218
323
|
permissionTrace: "权限追踪",
|
|
219
324
|
decisivePermission: "必要规则",
|
|
@@ -229,8 +334,9 @@ const Ee = {
|
|
|
229
334
|
__proto__: null,
|
|
230
335
|
auditLog: qe,
|
|
231
336
|
default: Vt
|
|
232
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
337
|
+
}, Symbol.toStringTag, { value: "Module" })), Pe = {
|
|
233
338
|
title: "審計日誌",
|
|
339
|
+
export: "匯出",
|
|
234
340
|
dateRange: {
|
|
235
341
|
placeholder: "選擇日期範圍"
|
|
236
342
|
},
|
|
@@ -254,14 +360,17 @@ const Ee = {
|
|
|
254
360
|
delete: "刪除"
|
|
255
361
|
},
|
|
256
362
|
columns: {
|
|
257
|
-
timestamp: "
|
|
363
|
+
timestamp: "日期",
|
|
258
364
|
user: "用戶",
|
|
365
|
+
role: "角色",
|
|
259
366
|
subject: "主題",
|
|
260
367
|
action: "操作",
|
|
261
368
|
operation: "操作說明",
|
|
262
369
|
outcome: "狀態"
|
|
263
370
|
},
|
|
264
371
|
outcome: {
|
|
372
|
+
success: "成功",
|
|
373
|
+
failed: "失敗",
|
|
265
374
|
allowed: "允許",
|
|
266
375
|
denied: "拒絕",
|
|
267
376
|
skipped: "已略過"
|
|
@@ -275,21 +384,52 @@ const Ee = {
|
|
|
275
384
|
prevPage: "上一頁",
|
|
276
385
|
nextPage: "下一頁"
|
|
277
386
|
},
|
|
387
|
+
exportSettings: {
|
|
388
|
+
title: "匯出欄位"
|
|
389
|
+
},
|
|
390
|
+
exportFields: {
|
|
391
|
+
timestamp: "日期",
|
|
392
|
+
userName: "用戶名稱",
|
|
393
|
+
userPhone: "手機號碼",
|
|
394
|
+
subject: "角色",
|
|
395
|
+
action: "操作",
|
|
396
|
+
operation: "操作說明",
|
|
397
|
+
outcome: "狀態",
|
|
398
|
+
businessId: "商家 ID",
|
|
399
|
+
restaurantId: "餐廳 ID",
|
|
400
|
+
country: "國家",
|
|
401
|
+
resolvedFrom: "解析來源",
|
|
402
|
+
requestMethod: "請求方法",
|
|
403
|
+
requestPath: "請求路徑"
|
|
404
|
+
},
|
|
278
405
|
detail: {
|
|
279
406
|
header: "審計日誌詳情",
|
|
407
|
+
date: "日期",
|
|
280
408
|
timestamp: "時間戳",
|
|
281
409
|
user: "用戶",
|
|
282
410
|
email: "電子郵件",
|
|
283
411
|
action: "操作",
|
|
284
412
|
operation: "操作說明",
|
|
413
|
+
role: "角色",
|
|
285
414
|
subject: "主題",
|
|
286
415
|
field: "字段",
|
|
287
416
|
outcome: "結果",
|
|
288
417
|
business: "商家",
|
|
289
418
|
restaurant: "餐廳",
|
|
419
|
+
changeDetails: "變更詳情",
|
|
420
|
+
eventType: "事件類型",
|
|
290
421
|
metadata: "元數據",
|
|
291
422
|
reason: "原因",
|
|
292
423
|
resolvedFrom: "解析來源",
|
|
424
|
+
resolvedFromValue: {
|
|
425
|
+
admin: "管理員",
|
|
426
|
+
staff: "員工",
|
|
427
|
+
permissionSet: "權限集",
|
|
428
|
+
systemPermissionSet: "系統權限集",
|
|
429
|
+
custom: "自訂",
|
|
430
|
+
noMatch: "無匹配",
|
|
431
|
+
unknown: "未知"
|
|
432
|
+
},
|
|
293
433
|
permissionSet: "權限集",
|
|
294
434
|
permissionTrace: "權限追蹤",
|
|
295
435
|
decisivePermission: "必要規則",
|
|
@@ -300,17 +440,17 @@ const Ee = {
|
|
|
300
440
|
requestBody: "請求內容"
|
|
301
441
|
}
|
|
302
442
|
}, Et = {
|
|
303
|
-
auditLog:
|
|
443
|
+
auditLog: Pe
|
|
304
444
|
}, xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
305
445
|
__proto__: null,
|
|
306
|
-
auditLog:
|
|
446
|
+
auditLog: Pe,
|
|
307
447
|
default: Et
|
|
308
448
|
}, Symbol.toStringTag, { value: "Module" })), qt = {
|
|
309
449
|
"en-US": ht,
|
|
310
450
|
"zh-CN": jt,
|
|
311
|
-
"th-TH":
|
|
451
|
+
"th-TH": Gt,
|
|
312
452
|
"zh-Hant": xt
|
|
313
|
-
},
|
|
453
|
+
}, Fe = {
|
|
314
454
|
employee: {
|
|
315
455
|
title: "Employee",
|
|
316
456
|
exportButtonLabel: "Export",
|
|
@@ -463,13 +603,13 @@ const Ee = {
|
|
|
463
603
|
placeholder: "Search restaurant"
|
|
464
604
|
}
|
|
465
605
|
}
|
|
466
|
-
},
|
|
467
|
-
hr:
|
|
468
|
-
},
|
|
606
|
+
}, Pt = {
|
|
607
|
+
hr: Fe
|
|
608
|
+
}, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
469
609
|
__proto__: null,
|
|
470
|
-
default:
|
|
471
|
-
hr:
|
|
472
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
610
|
+
default: Pt,
|
|
611
|
+
hr: Fe
|
|
612
|
+
}, Symbol.toStringTag, { value: "Module" })), Qe = {
|
|
473
613
|
employee: {
|
|
474
614
|
title: "พนักงาน",
|
|
475
615
|
exportButtonLabel: "ส่งออก",
|
|
@@ -621,13 +761,13 @@ const Ee = {
|
|
|
621
761
|
placeholder: "ค้นหาร้านอาหาร"
|
|
622
762
|
}
|
|
623
763
|
}
|
|
624
|
-
},
|
|
625
|
-
hr:
|
|
626
|
-
},
|
|
764
|
+
}, Qt = {
|
|
765
|
+
hr: Qe
|
|
766
|
+
}, Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
627
767
|
__proto__: null,
|
|
628
|
-
default:
|
|
629
|
-
hr:
|
|
630
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
768
|
+
default: Qt,
|
|
769
|
+
hr: Qe
|
|
770
|
+
}, Symbol.toStringTag, { value: "Module" })), Xe = {
|
|
631
771
|
employee: {
|
|
632
772
|
title: "员工",
|
|
633
773
|
exportButtonLabel: "导出",
|
|
@@ -780,13 +920,13 @@ const Ee = {
|
|
|
780
920
|
placeholder: "搜索餐厅"
|
|
781
921
|
}
|
|
782
922
|
}
|
|
783
|
-
},
|
|
784
|
-
hr:
|
|
923
|
+
}, Ht = {
|
|
924
|
+
hr: Xe
|
|
785
925
|
}, Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
786
926
|
__proto__: null,
|
|
787
|
-
default:
|
|
788
|
-
hr:
|
|
789
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
927
|
+
default: Ht,
|
|
928
|
+
hr: Xe
|
|
929
|
+
}, Symbol.toStringTag, { value: "Module" })), He = {
|
|
790
930
|
employee: {
|
|
791
931
|
title: "員工",
|
|
792
932
|
exportButtonLabel: "導出",
|
|
@@ -935,15 +1075,15 @@ const Ee = {
|
|
|
935
1075
|
}
|
|
936
1076
|
}
|
|
937
1077
|
}, Zt = {
|
|
938
|
-
hr:
|
|
1078
|
+
hr: He
|
|
939
1079
|
}, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
940
1080
|
__proto__: null,
|
|
941
1081
|
default: Zt,
|
|
942
|
-
hr:
|
|
943
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
944
|
-
"en-US":
|
|
1082
|
+
hr: He
|
|
1083
|
+
}, Symbol.toStringTag, { value: "Module" })), Nt = {
|
|
1084
|
+
"en-US": Ft,
|
|
945
1085
|
"zh-CN": Ot,
|
|
946
|
-
"th-TH":
|
|
1086
|
+
"th-TH": Xt,
|
|
947
1087
|
"zh-Hant": It
|
|
948
1088
|
}, Oe = {
|
|
949
1089
|
title: "Team members",
|
|
@@ -1078,12 +1218,12 @@ const Ee = {
|
|
|
1078
1218
|
permissions: "Permissions"
|
|
1079
1219
|
}
|
|
1080
1220
|
}
|
|
1081
|
-
},
|
|
1221
|
+
}, zt = {
|
|
1082
1222
|
team: Oe,
|
|
1083
1223
|
permissionSet: Ze
|
|
1084
1224
|
}, Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1085
1225
|
__proto__: null,
|
|
1086
|
-
default:
|
|
1226
|
+
default: zt,
|
|
1087
1227
|
permissionSet: Ze,
|
|
1088
1228
|
team: Oe
|
|
1089
1229
|
}, Symbol.toStringTag, { value: "Module" })), Ie = {
|
|
@@ -1181,7 +1321,7 @@ const Ee = {
|
|
|
1181
1321
|
selectPlaceholder: "เลือกบทบาทสิทธิ์"
|
|
1182
1322
|
}
|
|
1183
1323
|
}
|
|
1184
|
-
},
|
|
1324
|
+
}, Ne = {
|
|
1185
1325
|
title: "ชุดสิทธิ์",
|
|
1186
1326
|
createButtonLabel: "สร้างชุดสิทธิ์",
|
|
1187
1327
|
search: {
|
|
@@ -1220,13 +1360,13 @@ const Ee = {
|
|
|
1220
1360
|
}
|
|
1221
1361
|
}, Ut = {
|
|
1222
1362
|
team: Ie,
|
|
1223
|
-
permissionSet:
|
|
1363
|
+
permissionSet: Ne
|
|
1224
1364
|
}, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1225
1365
|
__proto__: null,
|
|
1226
1366
|
default: Ut,
|
|
1227
|
-
permissionSet:
|
|
1367
|
+
permissionSet: Ne,
|
|
1228
1368
|
team: Ie
|
|
1229
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1369
|
+
}, Symbol.toStringTag, { value: "Module" })), ze = {
|
|
1230
1370
|
title: "团队成员",
|
|
1231
1371
|
actions: {
|
|
1232
1372
|
addMember: "添加成员",
|
|
@@ -1359,13 +1499,13 @@ const Ee = {
|
|
|
1359
1499
|
}
|
|
1360
1500
|
}
|
|
1361
1501
|
}, Tt = {
|
|
1362
|
-
team:
|
|
1502
|
+
team: ze,
|
|
1363
1503
|
permissionSet: We
|
|
1364
1504
|
}, Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1365
1505
|
__proto__: null,
|
|
1366
1506
|
default: Tt,
|
|
1367
1507
|
permissionSet: We,
|
|
1368
|
-
team:
|
|
1508
|
+
team: ze
|
|
1369
1509
|
}, Symbol.toStringTag, { value: "Module" })), Ue = {
|
|
1370
1510
|
title: "團隊成員",
|
|
1371
1511
|
actions: {
|
|
@@ -1754,15 +1894,15 @@ const Ee = {
|
|
|
1754
1894
|
}
|
|
1755
1895
|
}, rs = {
|
|
1756
1896
|
grantUser: ke
|
|
1757
|
-
},
|
|
1897
|
+
}, as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1758
1898
|
__proto__: null,
|
|
1759
1899
|
default: rs,
|
|
1760
1900
|
grantUser: ke
|
|
1761
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1901
|
+
}, Symbol.toStringTag, { value: "Module" })), As = {
|
|
1762
1902
|
"en-US": _t,
|
|
1763
1903
|
"zh-CN": ss,
|
|
1764
1904
|
"th-TH": es,
|
|
1765
|
-
"zh-Hant":
|
|
1905
|
+
"zh-Hant": as
|
|
1766
1906
|
};
|
|
1767
1907
|
var ns = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1768
1908
|
function os(e) {
|
|
@@ -1775,21 +1915,21 @@ var Le = { exports: {} };
|
|
|
1775
1915
|
})(ns, function() {
|
|
1776
1916
|
return function(c) {
|
|
1777
1917
|
var r = {};
|
|
1778
|
-
function
|
|
1918
|
+
function a(n) {
|
|
1779
1919
|
if (r[n]) return r[n].exports;
|
|
1780
1920
|
var u = r[n] = { i: n, l: !1, exports: {} };
|
|
1781
|
-
return c[n].call(u.exports, u, u.exports,
|
|
1921
|
+
return c[n].call(u.exports, u, u.exports, a), u.l = !0, u.exports;
|
|
1782
1922
|
}
|
|
1783
|
-
return
|
|
1784
|
-
|
|
1785
|
-
},
|
|
1923
|
+
return a.m = c, a.c = r, a.d = function(n, u, m) {
|
|
1924
|
+
a.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: m });
|
|
1925
|
+
}, a.r = function(n) {
|
|
1786
1926
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1787
|
-
},
|
|
1788
|
-
if (1 & u && (n =
|
|
1927
|
+
}, a.t = function(n, u) {
|
|
1928
|
+
if (1 & u && (n = a(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
|
|
1789
1929
|
var m = /* @__PURE__ */ Object.create(null);
|
|
1790
|
-
if (
|
|
1930
|
+
if (a.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
|
|
1791
1931
|
for (var b in n)
|
|
1792
|
-
|
|
1932
|
+
a.d(
|
|
1793
1933
|
m,
|
|
1794
1934
|
b,
|
|
1795
1935
|
(function(v) {
|
|
@@ -1797,141 +1937,141 @@ var Le = { exports: {} };
|
|
|
1797
1937
|
}).bind(null, b)
|
|
1798
1938
|
);
|
|
1799
1939
|
return m;
|
|
1800
|
-
},
|
|
1940
|
+
}, a.n = function(n) {
|
|
1801
1941
|
var u = n && n.__esModule ? function() {
|
|
1802
1942
|
return n.default;
|
|
1803
1943
|
} : function() {
|
|
1804
1944
|
return n;
|
|
1805
1945
|
};
|
|
1806
|
-
return
|
|
1807
|
-
},
|
|
1946
|
+
return a.d(u, "a", u), u;
|
|
1947
|
+
}, a.o = function(n, u) {
|
|
1808
1948
|
return Object.prototype.hasOwnProperty.call(n, u);
|
|
1809
|
-
},
|
|
1949
|
+
}, a.p = "", a(a.s = 0);
|
|
1810
1950
|
}([
|
|
1811
|
-
function(c, r,
|
|
1812
|
-
c.exports =
|
|
1951
|
+
function(c, r, a) {
|
|
1952
|
+
c.exports = a(1);
|
|
1813
1953
|
},
|
|
1814
|
-
function(c, r,
|
|
1954
|
+
function(c, r, a) {
|
|
1815
1955
|
function n(t) {
|
|
1816
|
-
return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
1817
|
-
return typeof
|
|
1818
|
-
} : function(
|
|
1819
|
-
return
|
|
1956
|
+
return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(A) {
|
|
1957
|
+
return typeof A;
|
|
1958
|
+
} : function(A) {
|
|
1959
|
+
return A && typeof Symbol == "function" && A.constructor === Symbol && A !== Symbol.prototype ? "symbol" : typeof A;
|
|
1820
1960
|
})(t);
|
|
1821
1961
|
}
|
|
1822
1962
|
function u(t) {
|
|
1823
|
-
var
|
|
1824
|
-
return function(
|
|
1825
|
-
return Object.prototype.toString.call(
|
|
1963
|
+
var A = "[object " + t + "]";
|
|
1964
|
+
return function(l) {
|
|
1965
|
+
return Object.prototype.toString.call(l) === A;
|
|
1826
1966
|
};
|
|
1827
1967
|
}
|
|
1828
|
-
|
|
1968
|
+
a.r(r), a.d(r, "default", function() {
|
|
1829
1969
|
return lt;
|
|
1830
|
-
}),
|
|
1970
|
+
}), a.d(r, "compare", function() {
|
|
1831
1971
|
return Be;
|
|
1832
|
-
}),
|
|
1972
|
+
}), a.d(r, "comparable", function() {
|
|
1833
1973
|
return te;
|
|
1834
1974
|
});
|
|
1835
1975
|
var m = u("Array"), b = u("Object"), v = u("Function");
|
|
1836
|
-
function D(t,
|
|
1837
|
-
return v(t.get) ? t.get(
|
|
1976
|
+
function D(t, A) {
|
|
1977
|
+
return v(t.get) ? t.get(A) : t[A];
|
|
1838
1978
|
}
|
|
1839
|
-
function
|
|
1840
|
-
return function(
|
|
1841
|
-
if (!m(
|
|
1842
|
-
for (var g = 0, d =
|
|
1843
|
-
if (t(
|
|
1979
|
+
function y(t) {
|
|
1980
|
+
return function(A, l) {
|
|
1981
|
+
if (!m(l) || !l.length) return t(A, l);
|
|
1982
|
+
for (var g = 0, d = l.length; g < d; g++)
|
|
1983
|
+
if (t(A, D(l, g))) return !0;
|
|
1844
1984
|
return !1;
|
|
1845
1985
|
};
|
|
1846
1986
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return function(
|
|
1849
|
-
if (!m(
|
|
1850
|
-
for (var g = 0, d =
|
|
1851
|
-
if (!t(
|
|
1987
|
+
function H(t) {
|
|
1988
|
+
return function(A, l) {
|
|
1989
|
+
if (!m(l) || !l.length) return t(A, l);
|
|
1990
|
+
for (var g = 0, d = l.length; g < d; g++)
|
|
1991
|
+
if (!t(A, D(l, g))) return !1;
|
|
1852
1992
|
return !0;
|
|
1853
1993
|
};
|
|
1854
1994
|
}
|
|
1855
|
-
function h(t,
|
|
1856
|
-
return t.validate(t.options,
|
|
1995
|
+
function h(t, A, l, g) {
|
|
1996
|
+
return t.validate(t.options, A, l, g);
|
|
1857
1997
|
}
|
|
1858
1998
|
var j = {
|
|
1859
|
-
$eq:
|
|
1860
|
-
return t(
|
|
1999
|
+
$eq: y(function(t, A) {
|
|
2000
|
+
return t(A);
|
|
1861
2001
|
}),
|
|
1862
|
-
$ne:
|
|
1863
|
-
return t(
|
|
2002
|
+
$ne: H(function(t, A) {
|
|
2003
|
+
return t(A);
|
|
1864
2004
|
}),
|
|
1865
|
-
$gt:
|
|
1866
|
-
return t(
|
|
2005
|
+
$gt: y(function(t, A) {
|
|
2006
|
+
return t(A);
|
|
1867
2007
|
}),
|
|
1868
|
-
$gte:
|
|
1869
|
-
return t(
|
|
2008
|
+
$gte: y(function(t, A) {
|
|
2009
|
+
return t(A);
|
|
1870
2010
|
}),
|
|
1871
|
-
$lt:
|
|
1872
|
-
return t(
|
|
2011
|
+
$lt: y(function(t, A) {
|
|
2012
|
+
return t(A);
|
|
1873
2013
|
}),
|
|
1874
|
-
$lte:
|
|
1875
|
-
return t(
|
|
2014
|
+
$lte: y(function(t, A) {
|
|
2015
|
+
return t(A);
|
|
1876
2016
|
}),
|
|
1877
|
-
$mod:
|
|
1878
|
-
return t(
|
|
2017
|
+
$mod: y(function(t, A) {
|
|
2018
|
+
return t(A);
|
|
1879
2019
|
}),
|
|
1880
|
-
$in: function(t,
|
|
1881
|
-
return t(
|
|
2020
|
+
$in: function(t, A) {
|
|
2021
|
+
return t(A);
|
|
1882
2022
|
},
|
|
1883
|
-
$nin: function(t,
|
|
1884
|
-
return t(
|
|
2023
|
+
$nin: function(t, A) {
|
|
2024
|
+
return t(A);
|
|
1885
2025
|
},
|
|
1886
|
-
$not: function(t,
|
|
1887
|
-
return t(
|
|
2026
|
+
$not: function(t, A, l, g) {
|
|
2027
|
+
return t(A, l, g);
|
|
1888
2028
|
},
|
|
1889
|
-
$type: function(t,
|
|
1890
|
-
return t(
|
|
2029
|
+
$type: function(t, A) {
|
|
2030
|
+
return t(A);
|
|
1891
2031
|
},
|
|
1892
|
-
$all: function(t,
|
|
1893
|
-
return j.$and(t,
|
|
2032
|
+
$all: function(t, A, l, g) {
|
|
2033
|
+
return j.$and(t, A, l, g);
|
|
1894
2034
|
},
|
|
1895
|
-
$size: function(t,
|
|
1896
|
-
return !!
|
|
2035
|
+
$size: function(t, A) {
|
|
2036
|
+
return !!A && t === A.length;
|
|
1897
2037
|
},
|
|
1898
|
-
$or: function(t,
|
|
2038
|
+
$or: function(t, A, l, g) {
|
|
1899
2039
|
for (var d = 0, p = t.length; d < p; d++)
|
|
1900
|
-
if (h(D(t, d),
|
|
2040
|
+
if (h(D(t, d), A, l, g)) return !0;
|
|
1901
2041
|
return !1;
|
|
1902
2042
|
},
|
|
1903
|
-
$nor: function(t,
|
|
1904
|
-
return !j.$or(t,
|
|
2043
|
+
$nor: function(t, A, l, g) {
|
|
2044
|
+
return !j.$or(t, A, l, g);
|
|
1905
2045
|
},
|
|
1906
|
-
$and: function(t,
|
|
2046
|
+
$and: function(t, A, l, g) {
|
|
1907
2047
|
for (var d = 0, p = t.length; d < p; d++)
|
|
1908
|
-
if (!h(D(t, d),
|
|
2048
|
+
if (!h(D(t, d), A, l, g)) return !1;
|
|
1909
2049
|
return !0;
|
|
1910
2050
|
},
|
|
1911
|
-
$regex:
|
|
1912
|
-
return typeof
|
|
2051
|
+
$regex: y(function(t, A) {
|
|
2052
|
+
return typeof A == "string" && t.test(A);
|
|
1913
2053
|
}),
|
|
1914
|
-
$where: function(t,
|
|
1915
|
-
return t.call(
|
|
2054
|
+
$where: function(t, A, l, g) {
|
|
2055
|
+
return t.call(A, A, l, g);
|
|
1916
2056
|
},
|
|
1917
|
-
$elemMatch: function(t,
|
|
1918
|
-
return m(
|
|
2057
|
+
$elemMatch: function(t, A, l, g) {
|
|
2058
|
+
return m(A) ? !!~function(d, p) {
|
|
1919
2059
|
for (var f = 0; f < d.length; f++)
|
|
1920
2060
|
if (D(d, f), h(p, D(d, f))) return f;
|
|
1921
2061
|
return -1;
|
|
1922
|
-
}(
|
|
2062
|
+
}(A, t) : h(t, A, l, g);
|
|
1923
2063
|
},
|
|
1924
|
-
$exists: function(t,
|
|
1925
|
-
return g.hasOwnProperty(
|
|
2064
|
+
$exists: function(t, A, l, g) {
|
|
2065
|
+
return g.hasOwnProperty(l) === t;
|
|
1926
2066
|
}
|
|
1927
2067
|
}, q = {
|
|
1928
|
-
$eq: function(t,
|
|
1929
|
-
var g =
|
|
1930
|
-
return t instanceof RegExp ?
|
|
2068
|
+
$eq: function(t, A, l) {
|
|
2069
|
+
var g = l.comparable, d = l.compare;
|
|
2070
|
+
return t instanceof RegExp ? y(function(p) {
|
|
1931
2071
|
return typeof p == "string" && t.test(p);
|
|
1932
|
-
}) : t instanceof Function ?
|
|
2072
|
+
}) : t instanceof Function ? y(t) : m(t) && !t.length ? y(function(p) {
|
|
1933
2073
|
return m(p) && !p.length;
|
|
1934
|
-
}) :
|
|
2074
|
+
}) : y(
|
|
1935
2075
|
t === null ? function(p) {
|
|
1936
2076
|
return p == null;
|
|
1937
2077
|
} : function(p) {
|
|
@@ -1939,32 +2079,32 @@ var Le = { exports: {} };
|
|
|
1939
2079
|
}
|
|
1940
2080
|
);
|
|
1941
2081
|
},
|
|
1942
|
-
$gt: function(t,
|
|
1943
|
-
var g =
|
|
2082
|
+
$gt: function(t, A, l) {
|
|
2083
|
+
var g = l.comparable, d = l.compare;
|
|
1944
2084
|
return function(p) {
|
|
1945
2085
|
return d(g(p), g(t)) > 0;
|
|
1946
2086
|
};
|
|
1947
2087
|
},
|
|
1948
|
-
$gte: function(t,
|
|
1949
|
-
var g =
|
|
2088
|
+
$gte: function(t, A, l) {
|
|
2089
|
+
var g = l.comparable, d = l.compare;
|
|
1950
2090
|
return function(p) {
|
|
1951
2091
|
return d(g(p), g(t)) >= 0;
|
|
1952
2092
|
};
|
|
1953
2093
|
},
|
|
1954
|
-
$lt: function(t,
|
|
1955
|
-
var g =
|
|
2094
|
+
$lt: function(t, A, l) {
|
|
2095
|
+
var g = l.comparable, d = l.compare;
|
|
1956
2096
|
return function(p) {
|
|
1957
2097
|
return d(g(p), g(t)) < 0;
|
|
1958
2098
|
};
|
|
1959
2099
|
},
|
|
1960
|
-
$lte: function(t,
|
|
1961
|
-
var g =
|
|
2100
|
+
$lte: function(t, A, l) {
|
|
2101
|
+
var g = l.comparable, d = l.compare;
|
|
1962
2102
|
return function(p) {
|
|
1963
2103
|
return d(g(p), g(t)) <= 0;
|
|
1964
2104
|
};
|
|
1965
2105
|
},
|
|
1966
|
-
$in: function(t,
|
|
1967
|
-
var g =
|
|
2106
|
+
$in: function(t, A, l) {
|
|
2107
|
+
var g = l.comparable;
|
|
1968
2108
|
return function(d) {
|
|
1969
2109
|
if (!(d instanceof Array)) {
|
|
1970
2110
|
var p = g(d);
|
|
@@ -1977,7 +2117,7 @@ var Le = { exports: {} };
|
|
|
1977
2117
|
for (M = t.length; M--; ) if (t[M] == null) return !0;
|
|
1978
2118
|
}
|
|
1979
2119
|
for (M = t.length; M--; ) {
|
|
1980
|
-
var f = h(de(D(t, M),
|
|
2120
|
+
var f = h(de(D(t, M), l), p, M, t);
|
|
1981
2121
|
if (f && String(f) !== "[object Object]" && String(p) !== "[object Object]")
|
|
1982
2122
|
return !0;
|
|
1983
2123
|
}
|
|
@@ -1988,48 +2128,48 @@ var Le = { exports: {} };
|
|
|
1988
2128
|
return !1;
|
|
1989
2129
|
};
|
|
1990
2130
|
},
|
|
1991
|
-
$nin: function(t,
|
|
1992
|
-
var g = q.$in(t,
|
|
2131
|
+
$nin: function(t, A, l) {
|
|
2132
|
+
var g = q.$in(t, A, l);
|
|
1993
2133
|
return function(d, p, f, M) {
|
|
1994
2134
|
return !g(d, p, f, M);
|
|
1995
2135
|
};
|
|
1996
2136
|
},
|
|
1997
2137
|
$mod: function(t) {
|
|
1998
|
-
return function(
|
|
1999
|
-
return
|
|
2138
|
+
return function(A) {
|
|
2139
|
+
return A % t[0] == t[1];
|
|
2000
2140
|
};
|
|
2001
2141
|
},
|
|
2002
|
-
$ne: function(t,
|
|
2003
|
-
var g = q.$eq(t,
|
|
2004
|
-
return
|
|
2142
|
+
$ne: function(t, A, l) {
|
|
2143
|
+
var g = q.$eq(t, A, l);
|
|
2144
|
+
return H(function(d, p, f, M) {
|
|
2005
2145
|
return !g(d, p, f, M);
|
|
2006
2146
|
});
|
|
2007
2147
|
},
|
|
2008
|
-
$and: function(t,
|
|
2009
|
-
return t.map(I(
|
|
2148
|
+
$and: function(t, A, l) {
|
|
2149
|
+
return t.map(I(l));
|
|
2010
2150
|
},
|
|
2011
|
-
$all: function(t,
|
|
2012
|
-
return q.$and(t,
|
|
2151
|
+
$all: function(t, A, l) {
|
|
2152
|
+
return q.$and(t, A, l);
|
|
2013
2153
|
},
|
|
2014
|
-
$or: function(t,
|
|
2015
|
-
return t.map(I(
|
|
2154
|
+
$or: function(t, A, l) {
|
|
2155
|
+
return t.map(I(l));
|
|
2016
2156
|
},
|
|
2017
|
-
$nor: function(t,
|
|
2018
|
-
return t.map(I(
|
|
2157
|
+
$nor: function(t, A, l) {
|
|
2158
|
+
return t.map(I(l));
|
|
2019
2159
|
},
|
|
2020
|
-
$not: function(t,
|
|
2021
|
-
var g = I(
|
|
2160
|
+
$not: function(t, A, l) {
|
|
2161
|
+
var g = I(l)(t);
|
|
2022
2162
|
return function(d, p, f) {
|
|
2023
2163
|
return !h(g, d, p, f);
|
|
2024
2164
|
};
|
|
2025
2165
|
},
|
|
2026
2166
|
$type: function(t) {
|
|
2027
|
-
return function(
|
|
2028
|
-
return
|
|
2167
|
+
return function(A, l, g) {
|
|
2168
|
+
return A != null && (A instanceof t || A.constructor == t);
|
|
2029
2169
|
};
|
|
2030
2170
|
},
|
|
2031
|
-
$regex: function(t,
|
|
2032
|
-
return new RegExp(t,
|
|
2171
|
+
$regex: function(t, A) {
|
|
2172
|
+
return new RegExp(t, A.$options);
|
|
2033
2173
|
},
|
|
2034
2174
|
$where: function(t) {
|
|
2035
2175
|
if (typeof t == "function") return t;
|
|
@@ -2037,106 +2177,106 @@ var Le = { exports: {} };
|
|
|
2037
2177
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
2038
2178
|
);
|
|
2039
2179
|
},
|
|
2040
|
-
$elemMatch: function(t,
|
|
2041
|
-
return I(
|
|
2180
|
+
$elemMatch: function(t, A, l) {
|
|
2181
|
+
return I(l)(t);
|
|
2042
2182
|
},
|
|
2043
2183
|
$exists: function(t) {
|
|
2044
2184
|
return !!t;
|
|
2045
2185
|
}
|
|
2046
2186
|
};
|
|
2047
|
-
function
|
|
2048
|
-
return { options: t, validate:
|
|
2187
|
+
function Q(t, A) {
|
|
2188
|
+
return { options: t, validate: A };
|
|
2049
2189
|
}
|
|
2050
|
-
function ct(t,
|
|
2051
|
-
var
|
|
2052
|
-
if (function pe(
|
|
2053
|
-
if (R === U.length ||
|
|
2054
|
-
return void se.push([
|
|
2190
|
+
function ct(t, A) {
|
|
2191
|
+
var l = t.keyPath, g = t.child, d = t.query, p = [];
|
|
2192
|
+
if (function pe(X, U, R, ut, se) {
|
|
2193
|
+
if (R === U.length || X == null)
|
|
2194
|
+
return void se.push([X, U[R - 1], ut]);
|
|
2055
2195
|
var be = D(U, R);
|
|
2056
|
-
if (m(
|
|
2057
|
-
for (var re = 0, gt =
|
|
2058
|
-
else pe(D(
|
|
2059
|
-
}(
|
|
2196
|
+
if (m(X) && isNaN(Number(be)))
|
|
2197
|
+
for (var re = 0, gt = X.length; re < gt; re++) pe(D(X, re), U, R, X, se);
|
|
2198
|
+
else pe(D(X, be), U, R + 1, X, se);
|
|
2199
|
+
}(A, l, 0, A, p), p.length === 1) {
|
|
2060
2200
|
var f = p[0];
|
|
2061
2201
|
return h(g, f[0], f[1], f[2]);
|
|
2062
2202
|
}
|
|
2063
|
-
for (var M = d && d.$ne !== void 0,
|
|
2064
|
-
var
|
|
2065
|
-
M ?
|
|
2203
|
+
for (var M = d && d.$ne !== void 0, Y = M, E = 0; E < p.length; E++) {
|
|
2204
|
+
var P = p[E], J = h(g, P[0], P[1], P[2]);
|
|
2205
|
+
M ? Y &= J : Y |= J;
|
|
2066
2206
|
}
|
|
2067
|
-
return
|
|
2207
|
+
return Y;
|
|
2068
2208
|
}
|
|
2069
|
-
function it(t,
|
|
2070
|
-
return
|
|
2209
|
+
function it(t, A, l) {
|
|
2210
|
+
return Q({ keyPath: t, child: A, query: l }, ct);
|
|
2071
2211
|
}
|
|
2072
2212
|
function I(t) {
|
|
2073
|
-
var
|
|
2213
|
+
var A = t.comparable, l = t.expressions, g = function(f) {
|
|
2074
2214
|
var M;
|
|
2075
2215
|
return (!f || !(M = f) || M.constructor !== Object && M.constructor !== Array && M.constructor.toString() !== "function Object() { [native code] }" && M.constructor.toString() !== "function Array() { [native code] }" || M.toJSON) && (f = { $eq: f }), f;
|
|
2076
2216
|
}, d = function(f) {
|
|
2077
|
-
f =
|
|
2217
|
+
f = A(f);
|
|
2078
2218
|
var M = [];
|
|
2079
|
-
for (var
|
|
2080
|
-
var E = f[
|
|
2081
|
-
if (
|
|
2082
|
-
var
|
|
2083
|
-
if (
|
|
2219
|
+
for (var Y in f) {
|
|
2220
|
+
var E = f[Y];
|
|
2221
|
+
if (Y !== "$options") {
|
|
2222
|
+
var P = j[Y] || t && l && l[Y];
|
|
2223
|
+
if (P) q[Y] && (E = q[Y](E, f, t)), M.push(Q(A(E), P));
|
|
2084
2224
|
else {
|
|
2085
|
-
if (
|
|
2086
|
-
throw new Error("Unknown operation " +
|
|
2087
|
-
var J =
|
|
2225
|
+
if (Y.charCodeAt(0) === 36)
|
|
2226
|
+
throw new Error("Unknown operation " + Y);
|
|
2227
|
+
var J = Y.split(".");
|
|
2088
2228
|
M.push(it(J, p(E), E));
|
|
2089
2229
|
}
|
|
2090
2230
|
}
|
|
2091
2231
|
}
|
|
2092
|
-
return M.length === 1 ? M[0] :
|
|
2232
|
+
return M.length === 1 ? M[0] : Q(M, j.$and);
|
|
2093
2233
|
}, p = function(f) {
|
|
2094
|
-
return f = g(f), function M(
|
|
2095
|
-
if (!b(
|
|
2096
|
-
for (var
|
|
2234
|
+
return f = g(f), function M(Y, E) {
|
|
2235
|
+
if (!b(Y)) return E;
|
|
2236
|
+
for (var P in Y) E.push(P), M(Y[P], E);
|
|
2097
2237
|
return E;
|
|
2098
|
-
}(f, []).join(",").search(/[$.]/) === -1 ?
|
|
2238
|
+
}(f, []).join(",").search(/[$.]/) === -1 ? Q(f, K) : d(f);
|
|
2099
2239
|
};
|
|
2100
2240
|
return function(f) {
|
|
2101
2241
|
return d(g(f));
|
|
2102
2242
|
};
|
|
2103
2243
|
}
|
|
2104
|
-
function K(t,
|
|
2105
|
-
if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(
|
|
2244
|
+
function K(t, A) {
|
|
2245
|
+
if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(A))
|
|
2106
2246
|
return !1;
|
|
2107
2247
|
if (b(t)) {
|
|
2108
|
-
if (Object.keys(t).length !== Object.keys(
|
|
2109
|
-
for (var
|
|
2248
|
+
if (Object.keys(t).length !== Object.keys(A).length) return !1;
|
|
2249
|
+
for (var l in t) if (!K(t[l], A[l])) return !1;
|
|
2110
2250
|
return !0;
|
|
2111
2251
|
}
|
|
2112
2252
|
if (m(t)) {
|
|
2113
|
-
if (t.length !==
|
|
2253
|
+
if (t.length !== A.length) return !1;
|
|
2114
2254
|
for (var g = 0, d = t.length; g < d; g++)
|
|
2115
|
-
if (!K(t[g],
|
|
2255
|
+
if (!K(t[g], A[g])) return !1;
|
|
2116
2256
|
return !0;
|
|
2117
2257
|
}
|
|
2118
|
-
return t ===
|
|
2258
|
+
return t === A;
|
|
2119
2259
|
}
|
|
2120
|
-
function de(t,
|
|
2121
|
-
var
|
|
2122
|
-
return
|
|
2123
|
-
options:
|
|
2260
|
+
function de(t, A) {
|
|
2261
|
+
var l = I(A)(t);
|
|
2262
|
+
return A && A.select && (l = {
|
|
2263
|
+
options: l,
|
|
2124
2264
|
validate: function(g, d, p, f) {
|
|
2125
|
-
return h(g, d &&
|
|
2265
|
+
return h(g, d && A.select(d), p, f);
|
|
2126
2266
|
}
|
|
2127
|
-
}),
|
|
2267
|
+
}), l;
|
|
2128
2268
|
}
|
|
2129
|
-
function lt(t,
|
|
2130
|
-
var
|
|
2269
|
+
function lt(t, A) {
|
|
2270
|
+
var l = de(t, A = Object.assign({ compare: Be, comparable: te }, A));
|
|
2131
2271
|
return function(g, d, p) {
|
|
2132
|
-
return h(
|
|
2272
|
+
return h(l, g, d, p);
|
|
2133
2273
|
};
|
|
2134
2274
|
}
|
|
2135
|
-
function Be(t,
|
|
2136
|
-
if (K(t,
|
|
2137
|
-
if (n(t) === n(
|
|
2138
|
-
if (t >
|
|
2139
|
-
if (t <
|
|
2275
|
+
function Be(t, A) {
|
|
2276
|
+
if (K(t, A)) return 0;
|
|
2277
|
+
if (n(t) === n(A)) {
|
|
2278
|
+
if (t > A) return 1;
|
|
2279
|
+
if (t < A) return -1;
|
|
2140
2280
|
}
|
|
2141
2281
|
}
|
|
2142
2282
|
function te(t) {
|
|
@@ -2160,14 +2300,14 @@ function us(e, o, c) {
|
|
|
2160
2300
|
function gs(e, o) {
|
|
2161
2301
|
e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
|
|
2162
2302
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return
|
|
2303
|
+
function Ae(e) {
|
|
2304
|
+
return Ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(c) {
|
|
2165
2305
|
return c.__proto__ || Object.getPrototypeOf(c);
|
|
2166
|
-
},
|
|
2306
|
+
}, Ae(e);
|
|
2167
2307
|
}
|
|
2168
2308
|
function _(e, o) {
|
|
2169
|
-
return _ = Object.setPrototypeOf || function(r,
|
|
2170
|
-
return r.__proto__ =
|
|
2309
|
+
return _ = Object.setPrototypeOf || function(r, a) {
|
|
2310
|
+
return r.__proto__ = a, r;
|
|
2171
2311
|
}, _(e, o);
|
|
2172
2312
|
}
|
|
2173
2313
|
function ms() {
|
|
@@ -2181,10 +2321,10 @@ function ms() {
|
|
|
2181
2321
|
}
|
|
2182
2322
|
}
|
|
2183
2323
|
function L(e, o, c) {
|
|
2184
|
-
return ms() ? L = Reflect.construct : L = function(
|
|
2324
|
+
return ms() ? L = Reflect.construct : L = function(a, n, u) {
|
|
2185
2325
|
var m = [null];
|
|
2186
2326
|
m.push.apply(m, n);
|
|
2187
|
-
var b = Function.bind.apply(
|
|
2327
|
+
var b = Function.bind.apply(a, m), v = new b();
|
|
2188
2328
|
return u && _(v, u.prototype), v;
|
|
2189
2329
|
}, L.apply(null, arguments);
|
|
2190
2330
|
}
|
|
@@ -2199,19 +2339,19 @@ function ne(e) {
|
|
|
2199
2339
|
throw new TypeError("Super expression must either be null or a function");
|
|
2200
2340
|
if (typeof o < "u") {
|
|
2201
2341
|
if (o.has(r)) return o.get(r);
|
|
2202
|
-
o.set(r,
|
|
2342
|
+
o.set(r, a);
|
|
2203
2343
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return L(r, arguments,
|
|
2344
|
+
function a() {
|
|
2345
|
+
return L(r, arguments, Ae(this).constructor);
|
|
2206
2346
|
}
|
|
2207
|
-
return
|
|
2347
|
+
return a.prototype = Object.create(r.prototype, {
|
|
2208
2348
|
constructor: {
|
|
2209
|
-
value:
|
|
2349
|
+
value: a,
|
|
2210
2350
|
enumerable: !1,
|
|
2211
2351
|
writable: !0,
|
|
2212
2352
|
configurable: !0
|
|
2213
2353
|
}
|
|
2214
|
-
}), _(
|
|
2354
|
+
}), _(a, r);
|
|
2215
2355
|
}, ne(e);
|
|
2216
2356
|
}
|
|
2217
2357
|
function ve(e) {
|
|
@@ -2222,30 +2362,30 @@ function ve(e) {
|
|
|
2222
2362
|
var Se = function(o) {
|
|
2223
2363
|
return 'Cannot execute "' + o.action + '" on "' + o.subjectName + '"';
|
|
2224
2364
|
}, k = Se, Bs = /* @__PURE__ */ function(e) {
|
|
2225
|
-
gs(o, e), o.setDefaultMessage = function(
|
|
2226
|
-
|
|
2227
|
-
return
|
|
2228
|
-
} :
|
|
2229
|
-
}, o.from = function(
|
|
2365
|
+
gs(o, e), o.setDefaultMessage = function(a) {
|
|
2366
|
+
a === null ? k = Se : k = typeof a == "string" ? function() {
|
|
2367
|
+
return a;
|
|
2368
|
+
} : a;
|
|
2369
|
+
}, o.from = function(a) {
|
|
2230
2370
|
var n = new this("");
|
|
2231
2371
|
return Object.defineProperty(n, "ability", {
|
|
2232
|
-
value:
|
|
2372
|
+
value: a
|
|
2233
2373
|
}), n;
|
|
2234
2374
|
};
|
|
2235
|
-
function o(r,
|
|
2375
|
+
function o(r, a) {
|
|
2236
2376
|
var n;
|
|
2237
|
-
return
|
|
2377
|
+
return a === void 0 && (a = {}), n = e.call(this, r) || this, n._setMetadata(a), n.message = r || k(ve(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(ve(n), n.constructor)), n;
|
|
2238
2378
|
}
|
|
2239
2379
|
var c = o.prototype;
|
|
2240
|
-
return c.setMessage = function(
|
|
2241
|
-
return this._customMessage =
|
|
2242
|
-
}, c.throwUnlessCan = function(
|
|
2380
|
+
return c.setMessage = function(a) {
|
|
2381
|
+
return this._customMessage = a, this;
|
|
2382
|
+
}, c.throwUnlessCan = function(a, n, u) {
|
|
2243
2383
|
if (!this.ability)
|
|
2244
2384
|
throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
|
|
2245
|
-
var m = this.ability.relevantRuleFor(
|
|
2385
|
+
var m = this.ability.relevantRuleFor(a, n, u);
|
|
2246
2386
|
if (!(m && !m.inverted)) {
|
|
2247
2387
|
this._setMetadata({
|
|
2248
|
-
action:
|
|
2388
|
+
action: a,
|
|
2249
2389
|
subject: n,
|
|
2250
2390
|
field: u,
|
|
2251
2391
|
subjectName: this.ability.subjectName(n)
|
|
@@ -2253,8 +2393,8 @@ var Se = function(o) {
|
|
|
2253
2393
|
var b = m ? m.reason : "";
|
|
2254
2394
|
throw this.message = this._customMessage || b || k(this), this;
|
|
2255
2395
|
}
|
|
2256
|
-
}, c._setMetadata = function(
|
|
2257
|
-
this.subject =
|
|
2396
|
+
}, c._setMetadata = function(a) {
|
|
2397
|
+
this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field;
|
|
2258
2398
|
}, o;
|
|
2259
2399
|
}(ne(Error));
|
|
2260
2400
|
function oe(e) {
|
|
@@ -2271,15 +2411,15 @@ function bs(e) {
|
|
|
2271
2411
|
}
|
|
2272
2412
|
var fs = /[-/\\^$+?.()|[\]{}]/g, ws = /\.?\*+\.?/g, Ds = /\*+/, Ms = /\./g;
|
|
2273
2413
|
function vs(e, o, c) {
|
|
2274
|
-
var r = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*",
|
|
2414
|
+
var r = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(Ms, "\\$&").replace(Ds, a + r);
|
|
2275
2415
|
return o + e.length === c.length ? "(?:" + n + ")?" : n;
|
|
2276
2416
|
}
|
|
2277
|
-
function
|
|
2417
|
+
function ys(e, o, c) {
|
|
2278
2418
|
return e === "." && (c[o - 1] === "*" || c[o + 1] === "*") ? e : "\\" + e;
|
|
2279
2419
|
}
|
|
2280
|
-
function
|
|
2420
|
+
function Cs(e) {
|
|
2281
2421
|
var o = e.map(function(r) {
|
|
2282
|
-
return r.replace(fs,
|
|
2422
|
+
return r.replace(fs, ys).replace(ws, vs);
|
|
2283
2423
|
}), c = o.length > 1 ? "(?:" + o.join("|") + ")" : o[0];
|
|
2284
2424
|
return new RegExp("^" + c + "$");
|
|
2285
2425
|
}
|
|
@@ -2295,24 +2435,24 @@ var hs = /* @__PURE__ */ function() {
|
|
|
2295
2435
|
var o = e.prototype;
|
|
2296
2436
|
return o.matches = function(r) {
|
|
2297
2437
|
return this._matches ? typeof r == "string" ? !this.inverted : this._matches(r) : !0;
|
|
2298
|
-
}, o.isRelevantFor = function(r,
|
|
2299
|
-
return this.fields ?
|
|
2438
|
+
}, o.isRelevantFor = function(r, a) {
|
|
2439
|
+
return this.fields ? a ? this.matchesField(a) : !this.inverted : !0;
|
|
2300
2440
|
}, o.matchesField = function(r) {
|
|
2301
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null :
|
|
2441
|
+
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Cs(this.fields)), this._fieldsPattern === null || r.indexOf("*") !== -1 ? this.fields.indexOf(r) !== -1 : this._fieldsPattern.test(r);
|
|
2302
2442
|
}, e;
|
|
2303
|
-
}(), x = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(),
|
|
2443
|
+
}(), x = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), ye = {
|
|
2304
2444
|
crud: ["create", "read", "update", "delete"]
|
|
2305
2445
|
};
|
|
2306
|
-
function
|
|
2446
|
+
function Ce(e, o) {
|
|
2307
2447
|
return e === o || Array.isArray(o) && o.indexOf(e) !== -1;
|
|
2308
2448
|
}
|
|
2309
|
-
var
|
|
2310
|
-
e.addAlias = function(r,
|
|
2311
|
-
if (r === "manage" ||
|
|
2449
|
+
var Ys = /* @__PURE__ */ function() {
|
|
2450
|
+
e.addAlias = function(r, a) {
|
|
2451
|
+
if (r === "manage" || Ce("manage", a))
|
|
2312
2452
|
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
2313
|
-
if (
|
|
2314
|
-
throw new Error("Attempt to alias action to itself: " + r + " -> " +
|
|
2315
|
-
return
|
|
2453
|
+
if (Ce(r, a))
|
|
2454
|
+
throw new Error("Attempt to alias action to itself: " + r + " -> " + a.toString());
|
|
2455
|
+
return ye[r] = a, this;
|
|
2316
2456
|
};
|
|
2317
2457
|
function e(c, r) {
|
|
2318
2458
|
r === void 0 && (r = {}), Object.defineProperty(this, "subjectName", {
|
|
@@ -2324,67 +2464,67 @@ var Gs = /* @__PURE__ */ function() {
|
|
|
2324
2464
|
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
2325
2465
|
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
2326
2466
|
events: {},
|
|
2327
|
-
aliases: bs(
|
|
2467
|
+
aliases: bs(ye)
|
|
2328
2468
|
}, this.update(c);
|
|
2329
2469
|
}
|
|
2330
2470
|
var o = e.prototype;
|
|
2331
2471
|
return o.update = function(r) {
|
|
2332
2472
|
if (!Array.isArray(r))
|
|
2333
2473
|
return this;
|
|
2334
|
-
var
|
|
2474
|
+
var a = {
|
|
2335
2475
|
rules: r,
|
|
2336
2476
|
ability: this
|
|
2337
2477
|
};
|
|
2338
|
-
this.emit("update",
|
|
2478
|
+
this.emit("update", a), this[x].originalRules = r.slice(0), this[x].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
2339
2479
|
var n = this.buildIndexFor(r);
|
|
2340
|
-
return this[x].indexedRules = n.rules, this[x].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated",
|
|
2480
|
+
return this[x].indexedRules = n.rules, this[x].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", a), this;
|
|
2341
2481
|
}, o.buildIndexFor = function(r) {
|
|
2342
|
-
for (var
|
|
2343
|
-
var v = new n(r[b]), D = this.expandActions(v.actions),
|
|
2482
|
+
for (var a = /* @__PURE__ */ Object.create(null), n = this[x].RuleType, u = !0, m = !1, b = 0; b < r.length; b++) {
|
|
2483
|
+
var v = new n(r[b]), D = this.expandActions(v.actions), y = oe(v.subject), H = r.length - b - 1;
|
|
2344
2484
|
u = !!(u && v.inverted), !m && v.fields && (m = !0);
|
|
2345
|
-
for (var h = 0; h <
|
|
2346
|
-
var j =
|
|
2347
|
-
|
|
2485
|
+
for (var h = 0; h < y.length; h++) {
|
|
2486
|
+
var j = y[h];
|
|
2487
|
+
a[j] = a[j] || /* @__PURE__ */ Object.create(null);
|
|
2348
2488
|
for (var q = 0; q < D.length; q++) {
|
|
2349
|
-
var
|
|
2350
|
-
|
|
2489
|
+
var Q = D[q];
|
|
2490
|
+
a[j][Q] = a[j][Q] || /* @__PURE__ */ Object.create(null), a[j][Q][H] = v;
|
|
2351
2491
|
}
|
|
2352
2492
|
}
|
|
2353
2493
|
}
|
|
2354
2494
|
return {
|
|
2355
2495
|
isAllInverted: u,
|
|
2356
2496
|
hasPerFieldRules: m,
|
|
2357
|
-
rules:
|
|
2497
|
+
rules: a
|
|
2358
2498
|
};
|
|
2359
2499
|
}, o.expandActions = function(r) {
|
|
2360
|
-
for (var
|
|
2500
|
+
for (var a = this[x].aliases, n = oe(r), u = 0; u < n.length; ) {
|
|
2361
2501
|
var m = n[u++];
|
|
2362
|
-
|
|
2502
|
+
a.hasOwnProperty(m) && (n = n.concat(a[m]));
|
|
2363
2503
|
}
|
|
2364
2504
|
return n;
|
|
2365
|
-
}, o.can = function(r,
|
|
2505
|
+
}, o.can = function(r, a, n) {
|
|
2366
2506
|
if (n && typeof n != "string")
|
|
2367
2507
|
throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
|
|
2368
|
-
var u = this.relevantRuleFor(r,
|
|
2508
|
+
var u = this.relevantRuleFor(r, a, n);
|
|
2369
2509
|
return !!u && !u.inverted;
|
|
2370
|
-
}, o.relevantRuleFor = function(r,
|
|
2371
|
-
for (var u = this.rulesFor(r,
|
|
2372
|
-
if (u[m].matches(
|
|
2510
|
+
}, o.relevantRuleFor = function(r, a, n) {
|
|
2511
|
+
for (var u = this.rulesFor(r, a, n), m = 0; m < u.length; m++)
|
|
2512
|
+
if (u[m].matches(a))
|
|
2373
2513
|
return u[m];
|
|
2374
2514
|
return null;
|
|
2375
|
-
}, o.possibleRulesFor = function(r,
|
|
2376
|
-
var n = this.subjectName(
|
|
2515
|
+
}, o.possibleRulesFor = function(r, a) {
|
|
2516
|
+
var n = this.subjectName(a), u = this[x].mergedRules, m = n + "_" + r;
|
|
2377
2517
|
return u[m] || (u[m] = this.mergeRulesFor(r, n)), u[m];
|
|
2378
|
-
}, o.mergeRulesFor = function(r,
|
|
2379
|
-
var n = this[x].indexedRules, u = [
|
|
2518
|
+
}, o.mergeRulesFor = function(r, a) {
|
|
2519
|
+
var n = this[x].indexedRules, u = [a, "all"].reduce(function(m, b) {
|
|
2380
2520
|
var v = n[b];
|
|
2381
2521
|
return v ? Object.assign(m, v[r], v.manage) : m;
|
|
2382
2522
|
}, []);
|
|
2383
2523
|
return u.filter(Boolean);
|
|
2384
|
-
}, o.rulesFor = function(r,
|
|
2385
|
-
var u = this.possibleRulesFor(r,
|
|
2524
|
+
}, o.rulesFor = function(r, a, n) {
|
|
2525
|
+
var u = this.possibleRulesFor(r, a);
|
|
2386
2526
|
return this[x].hasPerFieldRules ? u.filter(function(m) {
|
|
2387
|
-
return m.isRelevantFor(
|
|
2527
|
+
return m.isRelevantFor(a, n);
|
|
2388
2528
|
}) : u;
|
|
2389
2529
|
}, o.cannot = function() {
|
|
2390
2530
|
return !this.can.apply(this, arguments);
|
|
@@ -2394,18 +2534,18 @@ var Gs = /* @__PURE__ */ function() {
|
|
|
2394
2534
|
Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
|
|
2395
2535
|
Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
|
|
2396
2536
|
`.trim()), (r = Bs.from(this)).throwUnlessCan.apply(r, arguments);
|
|
2397
|
-
}, o.on = function(r,
|
|
2537
|
+
}, o.on = function(r, a) {
|
|
2398
2538
|
var n = this[x].events, u = !0;
|
|
2399
|
-
return n[r] || (n[r] = []), n[r].push(
|
|
2539
|
+
return n[r] || (n[r] = []), n[r].push(a), function() {
|
|
2400
2540
|
if (u) {
|
|
2401
|
-
var m = n[r].indexOf(
|
|
2541
|
+
var m = n[r].indexOf(a);
|
|
2402
2542
|
n[r].splice(m, 1), u = !1;
|
|
2403
2543
|
}
|
|
2404
2544
|
};
|
|
2405
|
-
}, o.emit = function(r,
|
|
2545
|
+
}, o.emit = function(r, a) {
|
|
2406
2546
|
var n = this[x].events[r];
|
|
2407
2547
|
n && n.slice(0).forEach(function(u) {
|
|
2408
|
-
return u(
|
|
2548
|
+
return u(a);
|
|
2409
2549
|
});
|
|
2410
2550
|
}, us(e, [{
|
|
2411
2551
|
key: "rules",
|
|
@@ -2413,274 +2553,310 @@ var Gs = /* @__PURE__ */ function() {
|
|
|
2413
2553
|
return this[x].originalRules;
|
|
2414
2554
|
}
|
|
2415
2555
|
}]), e;
|
|
2416
|
-
}(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}),
|
|
2556
|
+
}(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}), i = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(i || {}), C = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(C || {}), _e = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(_e || {});
|
|
2417
2557
|
const w = {
|
|
2418
2558
|
general: "General",
|
|
2419
2559
|
inventory: "Inventory",
|
|
2420
2560
|
hrm: "HRM",
|
|
2421
2561
|
crm: "CRM",
|
|
2562
|
+
payment: "Payment",
|
|
2422
2563
|
report: "Report",
|
|
2423
2564
|
reports: "Default Report",
|
|
2424
2565
|
customReports: "Custom Report"
|
|
2425
|
-
},
|
|
2566
|
+
}, qr = [
|
|
2567
|
+
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
2568
|
+
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
2569
|
+
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
|
|
2570
|
+
{ key: "hrm", label: "HRM", subjectPrefixes: ["business::hrm", "hrm"] },
|
|
2571
|
+
{ key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"] }
|
|
2572
|
+
// Add more as modules are revamped with new actionguard:
|
|
2573
|
+
// { key: 'menu', label: 'Menu', subjectPrefixes: ['business::menu'] },
|
|
2574
|
+
// { key: 'crm', label: 'CRM', subjectPrefixes: ['business::crm'] },
|
|
2575
|
+
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
2576
|
+
], Gs = "access-denied", S = {
|
|
2426
2577
|
Action: s,
|
|
2427
2578
|
Subject: {
|
|
2428
|
-
Business:
|
|
2579
|
+
Business: i,
|
|
2429
2580
|
Restaurant: _e
|
|
2430
2581
|
}
|
|
2431
2582
|
}, $e = {
|
|
2432
|
-
[
|
|
2433
|
-
[
|
|
2434
|
-
[
|
|
2435
|
-
[
|
|
2436
|
-
[
|
|
2437
|
-
[
|
|
2438
|
-
[
|
|
2439
|
-
[
|
|
2440
|
-
[
|
|
2441
|
-
[
|
|
2442
|
-
[
|
|
2443
|
-
[
|
|
2444
|
-
[
|
|
2445
|
-
[
|
|
2446
|
-
[
|
|
2447
|
-
[
|
|
2448
|
-
[
|
|
2583
|
+
[C.permission]: i.hrm_teamMember,
|
|
2584
|
+
[C.promotion]: i.crm_promotion,
|
|
2585
|
+
[C.voucher]: i.crm_voucher,
|
|
2586
|
+
[C.membership]: i.crm_membership,
|
|
2587
|
+
[C.stock]: i.inventory_stock,
|
|
2588
|
+
[C.wastageTemplate]: i.inventory_wastageTemplate,
|
|
2589
|
+
[C.closingTemplate]: i.inventory_closingTemplate,
|
|
2590
|
+
[C.orderTemplate]: i.inventory_orderTemplate,
|
|
2591
|
+
[C.ingredient]: i.inventory_ingredient,
|
|
2592
|
+
[C.recipe]: i.inventory_recipe,
|
|
2593
|
+
[C.unit]: i.inventory_unit,
|
|
2594
|
+
[C.supplier]: i.inventory_supplier,
|
|
2595
|
+
[C.warehouse]: i.inventory_warehouse,
|
|
2596
|
+
[C.publish]: i.inventory_publish,
|
|
2597
|
+
[C.integration]: i.inventory_integration,
|
|
2598
|
+
[C.orderDraft]: i.inventory_orderDraftApproval,
|
|
2599
|
+
[C.unitCostHistory]: i.inventory_unitCostHistory
|
|
2449
2600
|
};
|
|
2450
2601
|
function Vs(e) {
|
|
2451
2602
|
return $e[e] ?? e;
|
|
2452
2603
|
}
|
|
2453
|
-
function
|
|
2604
|
+
function Pr(e) {
|
|
2454
2605
|
const o = Object.entries($e).find(([, c]) => c === e);
|
|
2455
2606
|
return o ? o[0] : e;
|
|
2456
2607
|
}
|
|
2457
|
-
const
|
|
2608
|
+
const Fr = {
|
|
2458
2609
|
// General
|
|
2459
2610
|
restaurant: {
|
|
2460
2611
|
label: "Restaurant Owner",
|
|
2461
|
-
subject:
|
|
2612
|
+
subject: i.restaurant,
|
|
2462
2613
|
actions: [s.manage],
|
|
2463
2614
|
category: w.general
|
|
2464
2615
|
},
|
|
2465
2616
|
menu: {
|
|
2466
2617
|
label: "Menu Management",
|
|
2467
|
-
subject:
|
|
2618
|
+
subject: i.menu,
|
|
2468
2619
|
actions: [s.manage],
|
|
2469
2620
|
category: w.general
|
|
2470
2621
|
},
|
|
2471
2622
|
// inventory
|
|
2472
2623
|
stockBalance: {
|
|
2473
2624
|
label: "Stock Balance Management",
|
|
2474
|
-
subject:
|
|
2625
|
+
subject: i.inventory_stockBalance,
|
|
2475
2626
|
actions: [s.manage],
|
|
2476
2627
|
category: w.inventory
|
|
2477
2628
|
},
|
|
2478
2629
|
stockAdjustment: {
|
|
2479
2630
|
label: "Stock Adjustment Management",
|
|
2480
|
-
subject:
|
|
2631
|
+
subject: i.inventory_stockAdjustment,
|
|
2481
2632
|
actions: [s.manage],
|
|
2482
2633
|
category: w.inventory
|
|
2483
2634
|
},
|
|
2484
2635
|
unitCostHistory: {
|
|
2485
2636
|
label: "Unit Cost History Management",
|
|
2486
|
-
subject:
|
|
2637
|
+
subject: i.inventory_unitCostHistory,
|
|
2487
2638
|
actions: [s.manage],
|
|
2488
2639
|
category: w.inventory
|
|
2489
2640
|
},
|
|
2490
2641
|
wastageTemplate: {
|
|
2491
2642
|
label: "Wastage Template Management",
|
|
2492
|
-
subject:
|
|
2643
|
+
subject: i.inventory_wastageTemplate,
|
|
2493
2644
|
actions: [s.manage],
|
|
2494
2645
|
category: w.inventory,
|
|
2495
2646
|
showByFeatureFlag: "inventory_pos_adjust_v2_wastage"
|
|
2496
2647
|
},
|
|
2497
2648
|
closingHistory: {
|
|
2498
2649
|
label: "Closing History Management",
|
|
2499
|
-
subject:
|
|
2650
|
+
subject: i.inventory_closingHistory,
|
|
2500
2651
|
actions: [s.manage],
|
|
2501
2652
|
category: w.inventory
|
|
2502
2653
|
},
|
|
2503
2654
|
closingTemplate: {
|
|
2504
2655
|
label: "Closing Template Management",
|
|
2505
|
-
subject:
|
|
2656
|
+
subject: i.inventory_closingTemplate,
|
|
2506
2657
|
actions: [s.manage],
|
|
2507
2658
|
category: w.inventory,
|
|
2508
2659
|
showByFeatureFlag: "inventory_pos_closing_v2"
|
|
2509
2660
|
},
|
|
2510
2661
|
closingDraft: {
|
|
2511
2662
|
label: "Closing Draft Management",
|
|
2512
|
-
subject:
|
|
2663
|
+
subject: i.inventory_closingDraft,
|
|
2513
2664
|
actions: [s.manage],
|
|
2514
2665
|
category: w.inventory,
|
|
2515
2666
|
showByFeatureFlag: "inventory_pos_closing_v2"
|
|
2516
2667
|
},
|
|
2517
2668
|
ingredient: {
|
|
2518
2669
|
label: "Ingredient Management",
|
|
2519
|
-
subject:
|
|
2670
|
+
subject: i.inventory_ingredient,
|
|
2520
2671
|
actions: [s.manage],
|
|
2521
2672
|
category: w.inventory
|
|
2522
2673
|
},
|
|
2523
2674
|
ingredientGroup: {
|
|
2524
2675
|
label: "Ingredient Group Management",
|
|
2525
|
-
subject:
|
|
2676
|
+
subject: i.inventory_ingredientGroup,
|
|
2526
2677
|
actions: [s.manage],
|
|
2527
2678
|
showByFeatureFlag: "inventory_ingredient_group",
|
|
2528
2679
|
category: w.inventory
|
|
2529
2680
|
},
|
|
2530
2681
|
recipe: {
|
|
2531
2682
|
label: "Recipe Management",
|
|
2532
|
-
subject:
|
|
2683
|
+
subject: i.inventory_recipe,
|
|
2533
2684
|
actions: [s.manage],
|
|
2534
2685
|
category: w.inventory
|
|
2535
2686
|
},
|
|
2536
2687
|
unit: {
|
|
2537
2688
|
label: "Unit Management",
|
|
2538
|
-
subject:
|
|
2689
|
+
subject: i.inventory_unit,
|
|
2539
2690
|
actions: [s.manage],
|
|
2540
2691
|
category: w.inventory
|
|
2541
2692
|
},
|
|
2542
2693
|
purchaseTransfer: {
|
|
2543
2694
|
label: "Purchase / Transfer Management",
|
|
2544
|
-
subject:
|
|
2695
|
+
subject: i.inventory_purchaseTransfer,
|
|
2545
2696
|
actions: [s.manage],
|
|
2546
2697
|
category: w.inventory
|
|
2547
2698
|
},
|
|
2548
2699
|
orderDraftApproval: {
|
|
2549
2700
|
label: "Order Draft Approval",
|
|
2550
|
-
subject:
|
|
2701
|
+
subject: i.inventory_orderDraftApproval,
|
|
2551
2702
|
actions: [s.manage],
|
|
2552
2703
|
category: w.inventory
|
|
2553
2704
|
},
|
|
2554
2705
|
transferOut: {
|
|
2555
2706
|
label: "Transfer Out Management",
|
|
2556
|
-
subject:
|
|
2707
|
+
subject: i.inventory_transferOut,
|
|
2557
2708
|
actions: [s.manage],
|
|
2558
2709
|
category: w.inventory
|
|
2559
2710
|
},
|
|
2560
2711
|
surcharge: {
|
|
2561
2712
|
label: "Surcharge Management",
|
|
2562
|
-
subject:
|
|
2713
|
+
subject: i.inventory_surcharge,
|
|
2563
2714
|
actions: [s.manage],
|
|
2564
2715
|
showByFeatureFlag: "inventory_portal_surcharge",
|
|
2565
2716
|
category: w.inventory
|
|
2566
2717
|
},
|
|
2567
2718
|
orderTemplate: {
|
|
2568
2719
|
label: "Order Template Management",
|
|
2569
|
-
subject:
|
|
2720
|
+
subject: i.inventory_orderTemplate,
|
|
2570
2721
|
actions: [s.manage],
|
|
2571
2722
|
showByFeatureFlag: "inventory_portal_must_use_transfer_template",
|
|
2572
2723
|
category: w.inventory
|
|
2573
2724
|
},
|
|
2574
2725
|
supplier: {
|
|
2575
2726
|
label: "Supplier Management",
|
|
2576
|
-
subject:
|
|
2727
|
+
subject: i.inventory_supplier,
|
|
2577
2728
|
actions: [s.manage],
|
|
2578
2729
|
category: w.inventory
|
|
2579
2730
|
},
|
|
2580
2731
|
warehouse: {
|
|
2581
2732
|
label: "Warehouse Management",
|
|
2582
|
-
subject:
|
|
2733
|
+
subject: i.inventory_warehouse,
|
|
2583
2734
|
actions: [s.manage],
|
|
2584
2735
|
category: w.inventory
|
|
2585
2736
|
},
|
|
2586
2737
|
publish: {
|
|
2587
2738
|
label: "Publish Management",
|
|
2588
|
-
subject:
|
|
2739
|
+
subject: i.inventory_publish,
|
|
2589
2740
|
actions: [s.manage],
|
|
2590
2741
|
category: w.inventory
|
|
2591
2742
|
},
|
|
2592
2743
|
import: {
|
|
2593
2744
|
label: "Import Management",
|
|
2594
|
-
subject:
|
|
2745
|
+
subject: i.inventory_import,
|
|
2595
2746
|
actions: [s.manage],
|
|
2596
2747
|
showByFeatureFlag: "inventory_bulk_import",
|
|
2597
2748
|
category: w.inventory
|
|
2598
2749
|
},
|
|
2599
2750
|
integration: {
|
|
2600
2751
|
label: "Integration Management",
|
|
2601
|
-
subject:
|
|
2752
|
+
subject: i.inventory_integration,
|
|
2602
2753
|
actions: [s.manage],
|
|
2603
2754
|
category: w.inventory
|
|
2604
2755
|
},
|
|
2605
2756
|
// CRM
|
|
2606
2757
|
promotion: {
|
|
2607
2758
|
label: "Promotion Management",
|
|
2608
|
-
subject:
|
|
2759
|
+
subject: i.crm_promotion,
|
|
2609
2760
|
actions: [s.manage],
|
|
2610
2761
|
category: w.crm
|
|
2611
2762
|
},
|
|
2612
2763
|
voucher: {
|
|
2613
2764
|
label: "Voucher Management",
|
|
2614
|
-
subject:
|
|
2765
|
+
subject: i.crm_voucher,
|
|
2615
2766
|
actions: [s.manage],
|
|
2616
2767
|
category: w.crm
|
|
2617
2768
|
},
|
|
2618
2769
|
membership: {
|
|
2619
2770
|
label: "Membership Management",
|
|
2620
|
-
subject:
|
|
2771
|
+
subject: i.crm_membership,
|
|
2621
2772
|
actions: [s.manage],
|
|
2622
2773
|
category: w.crm
|
|
2623
2774
|
},
|
|
2775
|
+
// Payment
|
|
2776
|
+
payoutAccount: {
|
|
2777
|
+
label: "Payout Account Management",
|
|
2778
|
+
subject: i.payment_payoutAccount,
|
|
2779
|
+
actions: [s.manage],
|
|
2780
|
+
category: w.payment
|
|
2781
|
+
},
|
|
2782
|
+
paymentOnboarding: {
|
|
2783
|
+
label: "Payment Onboarding Management",
|
|
2784
|
+
subject: i.payment_paymentOnboarding,
|
|
2785
|
+
actions: [s.manage],
|
|
2786
|
+
category: w.payment
|
|
2787
|
+
},
|
|
2788
|
+
transactions: {
|
|
2789
|
+
label: "Transactions Management",
|
|
2790
|
+
subject: i.payment_transactions,
|
|
2791
|
+
actions: [s.manage],
|
|
2792
|
+
category: w.payment
|
|
2793
|
+
},
|
|
2794
|
+
settlements: {
|
|
2795
|
+
label: "Settlements Management",
|
|
2796
|
+
subject: i.payment_settlements,
|
|
2797
|
+
actions: [s.manage],
|
|
2798
|
+
category: w.payment
|
|
2799
|
+
},
|
|
2624
2800
|
// HRM
|
|
2625
2801
|
teamMember: {
|
|
2626
2802
|
label: "Team Member Management",
|
|
2627
|
-
subject:
|
|
2803
|
+
subject: i.hrm_teamMember,
|
|
2628
2804
|
actions: [s.manage],
|
|
2629
2805
|
category: w.hrm
|
|
2630
2806
|
},
|
|
2631
2807
|
employee: {
|
|
2632
2808
|
label: "Employee Management",
|
|
2633
|
-
subject:
|
|
2809
|
+
subject: i.hrm_employee,
|
|
2634
2810
|
actions: [s.manage],
|
|
2635
2811
|
category: w.hrm
|
|
2636
2812
|
},
|
|
2637
2813
|
auditLog: {
|
|
2638
2814
|
label: "Audit Log Management",
|
|
2639
|
-
subject:
|
|
2815
|
+
subject: i.hrm_auditLog,
|
|
2640
2816
|
actions: [s.manage],
|
|
2641
2817
|
category: w.hrm
|
|
2642
2818
|
},
|
|
2643
2819
|
// Report
|
|
2644
2820
|
report_reports: {
|
|
2645
2821
|
label: "Create Report",
|
|
2646
|
-
subject:
|
|
2822
|
+
subject: i.report_createReport,
|
|
2647
2823
|
actions: [s.manage],
|
|
2648
2824
|
category: w.report
|
|
2649
2825
|
},
|
|
2650
2826
|
report_accessOverview: {
|
|
2651
2827
|
label: "Access Overview Page",
|
|
2652
|
-
subject:
|
|
2828
|
+
subject: i.report_accessOverview,
|
|
2653
2829
|
actions: [s.manage],
|
|
2654
2830
|
category: w.report
|
|
2655
2831
|
},
|
|
2656
2832
|
report_accessInsight: {
|
|
2657
2833
|
label: "Access Insight Page",
|
|
2658
|
-
subject:
|
|
2834
|
+
subject: i.report_accessInsight,
|
|
2659
2835
|
actions: [s.manage],
|
|
2660
2836
|
category: w.report
|
|
2661
2837
|
},
|
|
2662
2838
|
report_accessSetting: {
|
|
2663
2839
|
label: "Access Setting Page",
|
|
2664
|
-
subject:
|
|
2840
|
+
subject: i.report_accessSetting,
|
|
2665
2841
|
actions: [s.manage],
|
|
2666
2842
|
category: w.report
|
|
2667
2843
|
},
|
|
2668
2844
|
report_accessIntegration: {
|
|
2669
2845
|
label: "Access Integration Page",
|
|
2670
|
-
subject:
|
|
2846
|
+
subject: i.report_accessIntegration,
|
|
2671
2847
|
actions: [s.manage],
|
|
2672
2848
|
category: w.report
|
|
2673
2849
|
},
|
|
2674
2850
|
report_reports_allDefaultReports: {
|
|
2675
2851
|
label: "Include future Default Reports",
|
|
2676
|
-
subject:
|
|
2852
|
+
subject: i.report_reports_allDefaultReports,
|
|
2677
2853
|
actions: [s.manage, s.read, s.create],
|
|
2678
2854
|
category: w.reports,
|
|
2679
2855
|
isCategoryCover: !0
|
|
2680
2856
|
},
|
|
2681
2857
|
report_reports_allCustomReports: {
|
|
2682
2858
|
label: "Include future Custom Reports",
|
|
2683
|
-
subject:
|
|
2859
|
+
subject: i.report_reports_allCustomReports,
|
|
2684
2860
|
actions: [
|
|
2685
2861
|
s.manage,
|
|
2686
2862
|
s.read,
|
|
@@ -2853,13 +3029,13 @@ const Es = [
|
|
|
2853
3029
|
subject: B.inventory,
|
|
2854
3030
|
actions: [s.read, s.update]
|
|
2855
3031
|
}
|
|
2856
|
-
],
|
|
3032
|
+
], Ps = [
|
|
2857
3033
|
{
|
|
2858
3034
|
label: "Inventory",
|
|
2859
3035
|
subject: B.inventory,
|
|
2860
3036
|
actions: [s.read, s.update]
|
|
2861
3037
|
}
|
|
2862
|
-
],
|
|
3038
|
+
], at = [
|
|
2863
3039
|
{
|
|
2864
3040
|
label: "Purchase Order",
|
|
2865
3041
|
subject: B.inventory_purchaseOrder,
|
|
@@ -2900,7 +3076,7 @@ const Es = [
|
|
|
2900
3076
|
subject: B.inventory_shipment,
|
|
2901
3077
|
actions: [s.read, s.update]
|
|
2902
3078
|
}
|
|
2903
|
-
],
|
|
3079
|
+
], At = [
|
|
2904
3080
|
{
|
|
2905
3081
|
label: "Purchase Order",
|
|
2906
3082
|
subject: B.inventory_purchaseOrder,
|
|
@@ -2960,7 +3136,7 @@ const Es = [
|
|
|
2960
3136
|
subject: B.inventory_shipment,
|
|
2961
3137
|
actions: [s.read, s.update]
|
|
2962
3138
|
}
|
|
2963
|
-
],
|
|
3139
|
+
], Fs = [
|
|
2964
3140
|
...V,
|
|
2965
3141
|
{
|
|
2966
3142
|
label: "Order Draft Approval",
|
|
@@ -2969,12 +3145,12 @@ const Es = [
|
|
|
2969
3145
|
}
|
|
2970
3146
|
];
|
|
2971
3147
|
[
|
|
2972
|
-
...At,
|
|
2973
3148
|
...at,
|
|
3149
|
+
...At,
|
|
2974
3150
|
...nt,
|
|
2975
3151
|
...ot
|
|
2976
3152
|
];
|
|
2977
|
-
const
|
|
3153
|
+
const Qs = [
|
|
2978
3154
|
...V,
|
|
2979
3155
|
{
|
|
2980
3156
|
label: "Supplier",
|
|
@@ -2991,7 +3167,7 @@ const Hs = [
|
|
|
2991
3167
|
subject: B.inventory_orderTemplate,
|
|
2992
3168
|
actions: [s.read, s.update]
|
|
2993
3169
|
}
|
|
2994
|
-
],
|
|
3170
|
+
], Xs = [
|
|
2995
3171
|
...V,
|
|
2996
3172
|
{
|
|
2997
3173
|
label: "Warehouse",
|
|
@@ -3003,7 +3179,7 @@ const Hs = [
|
|
|
3003
3179
|
s.delete
|
|
3004
3180
|
]
|
|
3005
3181
|
}
|
|
3006
|
-
],
|
|
3182
|
+
], Hs = [
|
|
3007
3183
|
{
|
|
3008
3184
|
label: "Inventory",
|
|
3009
3185
|
subject: B.inventory,
|
|
@@ -3030,136 +3206,136 @@ const Hs = [
|
|
|
3030
3206
|
...me
|
|
3031
3207
|
];
|
|
3032
3208
|
const Is = {
|
|
3033
|
-
[`set_${
|
|
3209
|
+
[`set_${i.inventory_stockBalance}`]: {
|
|
3034
3210
|
key: "sys:inventory:stock_balance",
|
|
3035
3211
|
name: "Stock Balance",
|
|
3036
3212
|
permissions: ge
|
|
3037
3213
|
},
|
|
3038
|
-
[`set_${
|
|
3214
|
+
[`set_${i.inventory_stockAdjustment}`]: {
|
|
3039
3215
|
key: "sys:inventory:stock_adjustment",
|
|
3040
3216
|
name: "Stock Adjustment",
|
|
3041
3217
|
permissions: js
|
|
3042
3218
|
},
|
|
3043
|
-
[`set_${
|
|
3219
|
+
[`set_${i.inventory_unitCostHistory}`]: {
|
|
3044
3220
|
key: "sys:inventory:unit_cost_history",
|
|
3045
3221
|
name: "Unit Cost History",
|
|
3046
3222
|
permissions: et
|
|
3047
3223
|
},
|
|
3048
|
-
[`set_${
|
|
3224
|
+
[`set_${i.inventory_wastageTemplate}`]: {
|
|
3049
3225
|
key: "sys:inventory:wastage_template",
|
|
3050
3226
|
name: "Wastage Template",
|
|
3051
3227
|
permissions: tt
|
|
3052
3228
|
},
|
|
3053
|
-
[`set_${
|
|
3229
|
+
[`set_${i.inventory_closingHistory}`]: {
|
|
3054
3230
|
key: "sys:inventory:closing_history",
|
|
3055
3231
|
name: "Closing History",
|
|
3056
3232
|
permissions: me
|
|
3057
3233
|
},
|
|
3058
|
-
[`set_${
|
|
3234
|
+
[`set_${i.inventory_closingTemplate}`]: {
|
|
3059
3235
|
key: "sys:inventory:closing_template",
|
|
3060
3236
|
name: "Closing Template",
|
|
3061
3237
|
permissions: rt
|
|
3062
3238
|
},
|
|
3063
|
-
[`set_${
|
|
3239
|
+
[`set_${i.inventory_closingDraft}`]: {
|
|
3064
3240
|
key: "sys:inventory:closing_draft",
|
|
3065
3241
|
name: "Closing Draft",
|
|
3066
3242
|
permissions: st
|
|
3067
3243
|
},
|
|
3068
|
-
[`set_${
|
|
3244
|
+
[`set_${i.inventory_ingredient}`]: {
|
|
3069
3245
|
key: "sys:inventory:ingredient",
|
|
3070
3246
|
name: "Ingredient",
|
|
3071
3247
|
permissions: Es
|
|
3072
3248
|
},
|
|
3073
|
-
[`set_${
|
|
3249
|
+
[`set_${i.inventory_ingredientGroup}`]: {
|
|
3074
3250
|
key: "sys:inventory:ingredient_group",
|
|
3075
3251
|
name: "Ingredient Group",
|
|
3076
3252
|
permissions: xs
|
|
3077
3253
|
},
|
|
3078
|
-
[`set_${
|
|
3254
|
+
[`set_${i.inventory_recipe}`]: {
|
|
3079
3255
|
key: "sys:inventory:recipe",
|
|
3080
3256
|
name: "Recipe",
|
|
3081
3257
|
permissions: qs
|
|
3082
3258
|
},
|
|
3083
|
-
[`set_${
|
|
3259
|
+
[`set_${i.inventory_unit}`]: {
|
|
3084
3260
|
key: "sys:inventory:unit",
|
|
3085
3261
|
name: "Unit",
|
|
3086
|
-
permissions:
|
|
3262
|
+
permissions: Ps
|
|
3087
3263
|
},
|
|
3088
|
-
[`set_${
|
|
3264
|
+
[`set_${i.inventory_purchaseTransfer}`]: {
|
|
3089
3265
|
key: "sys:inventory:purchase_transfer",
|
|
3090
3266
|
name: "Purchase Transfer",
|
|
3091
|
-
permissions:
|
|
3267
|
+
permissions: at
|
|
3092
3268
|
},
|
|
3093
|
-
[`set_${
|
|
3269
|
+
[`set_${i.inventory_orderDraftApproval}`]: {
|
|
3094
3270
|
key: "sys:inventory:order_draft_approval",
|
|
3095
3271
|
name: "Order Draft Approval",
|
|
3096
|
-
permissions:
|
|
3272
|
+
permissions: Fs
|
|
3097
3273
|
},
|
|
3098
|
-
[`set_${
|
|
3274
|
+
[`set_${i.inventory_transferOut}`]: {
|
|
3099
3275
|
key: "sys:inventory:transfer_out",
|
|
3100
3276
|
name: "Transfer Out",
|
|
3101
|
-
permissions:
|
|
3277
|
+
permissions: At
|
|
3102
3278
|
},
|
|
3103
|
-
[`set_${
|
|
3279
|
+
[`set_${i.inventory_surcharge}`]: {
|
|
3104
3280
|
key: "sys:inventory:surcharge",
|
|
3105
3281
|
name: "Surcharge",
|
|
3106
3282
|
permissions: nt
|
|
3107
3283
|
},
|
|
3108
|
-
[`set_${
|
|
3284
|
+
[`set_${i.inventory_orderTemplate}`]: {
|
|
3109
3285
|
key: "sys:inventory:order_template",
|
|
3110
3286
|
name: "Order Template",
|
|
3111
3287
|
permissions: ot
|
|
3112
3288
|
},
|
|
3113
|
-
[`set_${
|
|
3289
|
+
[`set_${i.inventory_supplier}`]: {
|
|
3114
3290
|
key: "sys:inventory:supplier",
|
|
3115
3291
|
name: "Supplier",
|
|
3116
|
-
permissions:
|
|
3292
|
+
permissions: Qs
|
|
3117
3293
|
},
|
|
3118
|
-
[`set_${
|
|
3294
|
+
[`set_${i.inventory_warehouse}`]: {
|
|
3119
3295
|
key: "sys:inventory:warehouse",
|
|
3120
3296
|
name: "Warehouse",
|
|
3121
|
-
permissions:
|
|
3297
|
+
permissions: Xs
|
|
3122
3298
|
},
|
|
3123
|
-
[`set_${
|
|
3299
|
+
[`set_${i.inventory_publish}`]: {
|
|
3124
3300
|
key: "sys:inventory:publish",
|
|
3125
3301
|
name: "Publish",
|
|
3126
|
-
permissions:
|
|
3302
|
+
permissions: Hs
|
|
3127
3303
|
},
|
|
3128
|
-
[`set_${
|
|
3304
|
+
[`set_${i.inventory_import}`]: {
|
|
3129
3305
|
key: "sys:inventory:import",
|
|
3130
3306
|
name: "Import",
|
|
3131
3307
|
permissions: Os
|
|
3132
3308
|
},
|
|
3133
|
-
[`set_${
|
|
3309
|
+
[`set_${i.inventory_integration}`]: {
|
|
3134
3310
|
key: "sys:inventory:integration",
|
|
3135
3311
|
name: "Integration",
|
|
3136
3312
|
permissions: Zs
|
|
3137
3313
|
}
|
|
3138
3314
|
};
|
|
3139
|
-
var
|
|
3140
|
-
const
|
|
3315
|
+
var N = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(N || {});
|
|
3316
|
+
const Ns = {
|
|
3141
3317
|
/**
|
|
3142
3318
|
* Triggered by: hrm_teamMember:manage (portal toggle)
|
|
3143
3319
|
* Injects: team member list read + pos role read
|
|
3144
3320
|
* Users who can manage team members need to see the team member list and assign POS roles.
|
|
3145
3321
|
*/
|
|
3146
|
-
[`set_${
|
|
3322
|
+
[`set_${i.hrm_teamMember}`]: {
|
|
3147
3323
|
key: "sys:team_member_access",
|
|
3148
3324
|
name: "Team Member Access",
|
|
3149
3325
|
permissions: [
|
|
3150
3326
|
{
|
|
3151
3327
|
label: "Portal Users",
|
|
3152
|
-
subject:
|
|
3328
|
+
subject: N.hrm_portalUsers,
|
|
3153
3329
|
actions: [s.manage]
|
|
3154
3330
|
},
|
|
3155
3331
|
{
|
|
3156
3332
|
label: "Role resource",
|
|
3157
|
-
subject:
|
|
3333
|
+
subject: i.role,
|
|
3158
3334
|
actions: [s.read, s.update]
|
|
3159
3335
|
},
|
|
3160
3336
|
{
|
|
3161
3337
|
label: "Pos Role",
|
|
3162
|
-
subject:
|
|
3338
|
+
subject: N.hrm_posRole,
|
|
3163
3339
|
actions: [s.read]
|
|
3164
3340
|
}
|
|
3165
3341
|
]
|
|
@@ -3168,23 +3344,23 @@ const zs = {
|
|
|
3168
3344
|
* Triggered by: hrm_employee:manage (portal toggle)
|
|
3169
3345
|
* Injects: pos role read + restaurant manage (cross-level: needed for employee–restaurant linking)
|
|
3170
3346
|
*/
|
|
3171
|
-
[`set_${
|
|
3347
|
+
[`set_${i.hrm_employee}`]: {
|
|
3172
3348
|
key: "sys:employee_access",
|
|
3173
3349
|
name: "Employee Access",
|
|
3174
3350
|
permissions: [
|
|
3175
3351
|
{
|
|
3176
3352
|
label: "Portal Users",
|
|
3177
|
-
subject:
|
|
3353
|
+
subject: N.hrm_portalUsers,
|
|
3178
3354
|
actions: [s.read]
|
|
3179
3355
|
},
|
|
3180
3356
|
{
|
|
3181
3357
|
label: "Restaurant resource",
|
|
3182
|
-
subject:
|
|
3358
|
+
subject: i.restaurant,
|
|
3183
3359
|
actions: [s.read]
|
|
3184
3360
|
},
|
|
3185
3361
|
{
|
|
3186
3362
|
label: "Pos Role",
|
|
3187
|
-
subject:
|
|
3363
|
+
subject: N.hrm_posRole,
|
|
3188
3364
|
actions: [s.manage]
|
|
3189
3365
|
}
|
|
3190
3366
|
]
|
|
@@ -3195,22 +3371,22 @@ const zs = {
|
|
|
3195
3371
|
* Uses HrmResource.hrm_portalUsers (not the module subject hrm_teamMember) to avoid
|
|
3196
3372
|
* conflating the audit-log read dependency with the full team-management module grant.
|
|
3197
3373
|
*/
|
|
3198
|
-
[`set_${
|
|
3374
|
+
[`set_${i.hrm_auditLog}`]: {
|
|
3199
3375
|
key: "sys:audit_log_access",
|
|
3200
3376
|
name: "Audit Log Access",
|
|
3201
3377
|
permissions: [
|
|
3202
3378
|
{
|
|
3203
3379
|
label: "Portal Users",
|
|
3204
|
-
subject:
|
|
3380
|
+
subject: N.hrm_portalUsers,
|
|
3205
3381
|
actions: [s.read]
|
|
3206
3382
|
}
|
|
3207
3383
|
]
|
|
3208
3384
|
}
|
|
3209
|
-
},
|
|
3385
|
+
}, zs = {
|
|
3210
3386
|
...Is,
|
|
3211
|
-
...
|
|
3212
|
-
},
|
|
3213
|
-
|
|
3387
|
+
...Ns
|
|
3388
|
+
}, Qr = Object.values(
|
|
3389
|
+
zs
|
|
3214
3390
|
).flatMap((e) => e.permissions ?? []).reduce(
|
|
3215
3391
|
(e, o) => {
|
|
3216
3392
|
var c;
|
|
@@ -3226,12 +3402,12 @@ function Ws(e) {
|
|
|
3226
3402
|
}));
|
|
3227
3403
|
}
|
|
3228
3404
|
function Us(e) {
|
|
3229
|
-
return new
|
|
3405
|
+
return new Ys(Ws(e));
|
|
3230
3406
|
}
|
|
3231
3407
|
function Rs(e, o, c) {
|
|
3232
|
-
const r = Array.isArray(e) ? e : [e],
|
|
3408
|
+
const r = Array.isArray(e) ? e : [e], a = Us(o), n = (D) => D.subject, u = (D) => a.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? a.can(D.action, D.coverSubject, D.field) : !1, m = r.find((D) => !u(D));
|
|
3233
3409
|
if (m) {
|
|
3234
|
-
const D =
|
|
3410
|
+
const D = a.relevantRuleFor(
|
|
3235
3411
|
m.action,
|
|
3236
3412
|
n(m),
|
|
3237
3413
|
m.field
|
|
@@ -3242,7 +3418,7 @@ function Rs(e, o, c) {
|
|
|
3242
3418
|
decisiveRule: D ?? null
|
|
3243
3419
|
};
|
|
3244
3420
|
}
|
|
3245
|
-
const b = r[0], v =
|
|
3421
|
+
const b = r[0], v = a.relevantRuleFor(b.action, n(b), b.field);
|
|
3246
3422
|
return { granted: !0, decisivePermission: b, decisiveRule: v ?? null };
|
|
3247
3423
|
}
|
|
3248
3424
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -3254,37 +3430,37 @@ function Ks(e, o, c) {
|
|
|
3254
3430
|
evaluating: c
|
|
3255
3431
|
} : r = {};
|
|
3256
3432
|
const {
|
|
3257
|
-
lazy:
|
|
3433
|
+
lazy: a = !1,
|
|
3258
3434
|
evaluating: n = void 0,
|
|
3259
3435
|
shallow: u = !0,
|
|
3260
3436
|
onError: m = Ts
|
|
3261
|
-
} = r, b = T(!
|
|
3437
|
+
} = r, b = T(!a), v = u ? dt(o) : T(o);
|
|
3262
3438
|
let D = 0;
|
|
3263
|
-
return he(async (
|
|
3439
|
+
return he(async (y) => {
|
|
3264
3440
|
if (!b.value)
|
|
3265
3441
|
return;
|
|
3266
3442
|
D++;
|
|
3267
|
-
const
|
|
3443
|
+
const H = D;
|
|
3268
3444
|
let h = !1;
|
|
3269
3445
|
n && Promise.resolve().then(() => {
|
|
3270
3446
|
n.value = !0;
|
|
3271
3447
|
});
|
|
3272
3448
|
try {
|
|
3273
3449
|
const j = await e((q) => {
|
|
3274
|
-
|
|
3450
|
+
y(() => {
|
|
3275
3451
|
n && (n.value = !1), h || q();
|
|
3276
3452
|
});
|
|
3277
3453
|
});
|
|
3278
|
-
|
|
3454
|
+
H === D && (v.value = j);
|
|
3279
3455
|
} catch (j) {
|
|
3280
3456
|
m(j);
|
|
3281
3457
|
} finally {
|
|
3282
|
-
n &&
|
|
3458
|
+
n && H === D && (n.value = !1), h = !0;
|
|
3283
3459
|
}
|
|
3284
|
-
}),
|
|
3460
|
+
}), a ? ie(() => (b.value = !0, v.value)) : v;
|
|
3285
3461
|
}
|
|
3286
3462
|
async function Js(e) {
|
|
3287
|
-
const { sessionUser: o, validationManifest: c } = e, { requiredRoles: r, requiredCaslPermissions:
|
|
3463
|
+
const { sessionUser: o, validationManifest: c } = e, { requiredRoles: r, requiredCaslPermissions: a, customValidationFunction: n } = c;
|
|
3288
3464
|
if (!o)
|
|
3289
3465
|
return { canAccess: !1 };
|
|
3290
3466
|
if (r && r.length > 0 && !r.includes(o._role || ""))
|
|
@@ -3292,8 +3468,8 @@ async function Js(e) {
|
|
|
3292
3468
|
canAccess: !1,
|
|
3293
3469
|
message: "User does not have permission to access"
|
|
3294
3470
|
});
|
|
3295
|
-
if (
|
|
3296
|
-
const { granted: u } = Rs(
|
|
3471
|
+
if (a && a.length > 0) {
|
|
3472
|
+
const { granted: u } = Rs(a, o.permissions);
|
|
3297
3473
|
if (!u)
|
|
3298
3474
|
return Promise.resolve({
|
|
3299
3475
|
canAccess: !1,
|
|
@@ -3318,7 +3494,7 @@ async function ks(e, o) {
|
|
|
3318
3494
|
return {
|
|
3319
3495
|
canAccess: !1,
|
|
3320
3496
|
message: r.message,
|
|
3321
|
-
redirectTo:
|
|
3497
|
+
redirectTo: Gs
|
|
3322
3498
|
};
|
|
3323
3499
|
}
|
|
3324
3500
|
return {
|
|
@@ -3361,12 +3537,12 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3361
3537
|
subtitle: "哎呀!您沒有權限存取此頁面。"
|
|
3362
3538
|
}, rr = {
|
|
3363
3539
|
noPermission: sr
|
|
3364
|
-
},
|
|
3540
|
+
}, ar = {
|
|
3365
3541
|
title: "การเข้าถึงถูกปฏิเสธ",
|
|
3366
3542
|
subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
|
|
3367
|
-
},
|
|
3368
|
-
noPermission:
|
|
3369
|
-
}, nr = { class: "w-full h-full flex justify-center items-center" }, or = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, cr = { class: "w-[300px] h-[300px]" }, ir = ["src"], lr = { class: "text-2xl" }, ur = { class: "text-xl" }, gr = /* @__PURE__ */
|
|
3543
|
+
}, Ar = {
|
|
3544
|
+
noPermission: ar
|
|
3545
|
+
}, nr = { class: "w-full h-full flex justify-center items-center" }, or = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, cr = { class: "w-[300px] h-[300px]" }, ir = ["src"], lr = { class: "text-2xl" }, ur = { class: "text-xl" }, gr = /* @__PURE__ */ z({
|
|
3370
3546
|
__name: "NoPermission",
|
|
3371
3547
|
setup(e) {
|
|
3372
3548
|
const { t: o } = je({
|
|
@@ -3374,10 +3550,10 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3374
3550
|
"en-US": $s,
|
|
3375
3551
|
"zh-CN": tr,
|
|
3376
3552
|
"zh-Hant": rr,
|
|
3377
|
-
"th-TH":
|
|
3553
|
+
"th-TH": Ar
|
|
3378
3554
|
}
|
|
3379
3555
|
});
|
|
3380
|
-
return (c, r) => (W(),
|
|
3556
|
+
return (c, r) => (W(), Ge("div", nr, [
|
|
3381
3557
|
O("div", or, [
|
|
3382
3558
|
O("div", cr, [
|
|
3383
3559
|
O("img", {
|
|
@@ -3392,60 +3568,63 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3392
3568
|
])
|
|
3393
3569
|
]));
|
|
3394
3570
|
}
|
|
3395
|
-
}), mr = /* @__PURE__ */
|
|
3571
|
+
}), mr = /* @__PURE__ */ z({
|
|
3396
3572
|
__name: "PermissionWrapper",
|
|
3397
3573
|
setup(e) {
|
|
3398
3574
|
const o = Ls();
|
|
3399
|
-
return (c, r) => Z(o) === Z(ce).Denied ? (W(), $(gr, { key: 0 })) : Z(o) === Z(ce).Allowed ?
|
|
3575
|
+
return (c, r) => Z(o) === Z(ce).Denied ? (W(), $(gr, { key: 0 })) : Z(o) === Z(ce).Allowed ? Ye(c.$slots, "default", { key: 1 }) : Bt("", !0);
|
|
3400
3576
|
}
|
|
3401
3577
|
});
|
|
3402
3578
|
function ee(e) {
|
|
3403
3579
|
return {
|
|
3404
|
-
|
|
3580
|
+
inheritAttrs: !1,
|
|
3581
|
+
setup(o, { attrs: c }) {
|
|
3582
|
+
return () => fe(mr, {}, { default: () => fe(e, c) });
|
|
3583
|
+
}
|
|
3405
3584
|
};
|
|
3406
3585
|
}
|
|
3407
3586
|
function dr(e, o) {
|
|
3408
3587
|
const c = T({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
3409
3588
|
function r() {
|
|
3410
3589
|
if (e.value) {
|
|
3411
|
-
const
|
|
3590
|
+
const a = e.value.getBoundingClientRect();
|
|
3412
3591
|
c.value = {
|
|
3413
|
-
top:
|
|
3414
|
-
bottom:
|
|
3415
|
-
left:
|
|
3416
|
-
right:
|
|
3592
|
+
top: a.top,
|
|
3593
|
+
bottom: a.bottom,
|
|
3594
|
+
left: a.left,
|
|
3595
|
+
right: a.right
|
|
3417
3596
|
};
|
|
3418
3597
|
}
|
|
3419
3598
|
}
|
|
3420
3599
|
return De(o, async () => {
|
|
3421
3600
|
await Me(), r();
|
|
3422
|
-
}), De(e, async (
|
|
3423
|
-
|
|
3601
|
+
}), De(e, async (a) => {
|
|
3602
|
+
a && (await Me(), r());
|
|
3424
3603
|
}), Ve(() => {
|
|
3425
3604
|
window.addEventListener("resize", r);
|
|
3426
3605
|
}), pt(() => {
|
|
3427
3606
|
window.removeEventListener("resize", r);
|
|
3428
3607
|
}), c;
|
|
3429
3608
|
}
|
|
3430
|
-
const Br = /* @__PURE__ */
|
|
3609
|
+
const Br = /* @__PURE__ */ z({
|
|
3431
3610
|
__name: "FullWrapper",
|
|
3432
3611
|
setup(e) {
|
|
3433
|
-
const o = Mt(), c = T(null), r = dr(c),
|
|
3612
|
+
const o = Mt(), c = T(null), r = dr(c), a = ie(() => {
|
|
3434
3613
|
var m;
|
|
3435
3614
|
const u = o.isAtMost("sm") ? 56 : 0;
|
|
3436
3615
|
return {
|
|
3437
3616
|
height: `calc(100dvh - ${((m = r.value) == null ? void 0 : m.top) + 24 + u}px)`
|
|
3438
3617
|
};
|
|
3439
3618
|
});
|
|
3440
|
-
return (n, u) => (W(),
|
|
3619
|
+
return (n, u) => (W(), Ge("div", {
|
|
3441
3620
|
ref_key: "wrapper",
|
|
3442
3621
|
ref: c,
|
|
3443
|
-
style: bt(
|
|
3622
|
+
style: bt(a.value)
|
|
3444
3623
|
}, [
|
|
3445
|
-
|
|
3624
|
+
Ye(n.$slots, "default")
|
|
3446
3625
|
], 4));
|
|
3447
3626
|
}
|
|
3448
|
-
}), pr = { class: "flex justify-center items-center h-full w-full" }, br = /* @__PURE__ */
|
|
3627
|
+
}), pr = { class: "flex justify-center items-center h-full w-full" }, br = /* @__PURE__ */ z({
|
|
3449
3628
|
__name: "PageLoading",
|
|
3450
3629
|
setup(e) {
|
|
3451
3630
|
return (o, c) => {
|
|
@@ -3460,12 +3639,12 @@ const Br = /* @__PURE__ */ N({
|
|
|
3460
3639
|
});
|
|
3461
3640
|
};
|
|
3462
3641
|
}
|
|
3463
|
-
}),
|
|
3642
|
+
}), F = (e) => Dt({
|
|
3464
3643
|
loader: e,
|
|
3465
3644
|
loadingComponent: br
|
|
3466
3645
|
});
|
|
3467
|
-
var
|
|
3468
|
-
const
|
|
3646
|
+
var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e.POS_GRANT = "pos-grant", e))(G || {});
|
|
3647
|
+
const ae = (e) => ({
|
|
3469
3648
|
validationManifest: {
|
|
3470
3649
|
requiredCaslPermissions: [
|
|
3471
3650
|
{
|
|
@@ -3474,16 +3653,16 @@ const Ae = (e) => ({
|
|
|
3474
3653
|
}
|
|
3475
3654
|
]
|
|
3476
3655
|
}
|
|
3477
|
-
}), fr = ee(
|
|
3478
|
-
|
|
3479
|
-
), Mr = ee(
|
|
3480
|
-
() => import("./PermissionSetList-
|
|
3481
|
-
),
|
|
3656
|
+
}), fr = ee(F(() => import("./Main-BDXOkOE2.js"))), wr = ee(F(() => import("./Main-C3koRp1u.js"))), Dr = ee(
|
|
3657
|
+
F(() => import("./AuditLogList-CNrMFE7u.js"))
|
|
3658
|
+
), Mr = ee(F(() => import("./Main-BJh3lH16.js"))), vr = F(() => import("./EmployeeList-cOmlbt40.js")), yr = F(() => import("./RoleList-Bd3v0EoJ.js")), Cr = F(() => import("./TimesheetList-DkJWAHEN.js")), hr = F(() => import("./TeamMemberList-CbfbIqYV.js")), Yr = F(
|
|
3659
|
+
() => import("./PermissionSetList-CLJn0V0J.js")
|
|
3660
|
+
), Xr = [
|
|
3482
3661
|
{
|
|
3483
3662
|
path: "/",
|
|
3484
3663
|
name: "home",
|
|
3485
3664
|
component: fr,
|
|
3486
|
-
meta:
|
|
3665
|
+
meta: ae(S.Subject.Business.hrm_employee),
|
|
3487
3666
|
redirect: {
|
|
3488
3667
|
name: "employee"
|
|
3489
3668
|
/* EMPLOYEE */
|
|
@@ -3497,12 +3676,12 @@ const Ae = (e) => ({
|
|
|
3497
3676
|
{
|
|
3498
3677
|
path: "role",
|
|
3499
3678
|
name: "role",
|
|
3500
|
-
component:
|
|
3679
|
+
component: yr
|
|
3501
3680
|
},
|
|
3502
3681
|
{
|
|
3503
3682
|
path: "timesheet",
|
|
3504
3683
|
name: "timesheet",
|
|
3505
|
-
component:
|
|
3684
|
+
component: Cr
|
|
3506
3685
|
}
|
|
3507
3686
|
]
|
|
3508
3687
|
},
|
|
@@ -3510,13 +3689,13 @@ const Ae = (e) => ({
|
|
|
3510
3689
|
path: "/audit-log",
|
|
3511
3690
|
name: "audit-log",
|
|
3512
3691
|
component: Dr,
|
|
3513
|
-
meta:
|
|
3692
|
+
meta: ae(S.Subject.Business.hrm_auditLog)
|
|
3514
3693
|
},
|
|
3515
3694
|
{
|
|
3516
3695
|
path: "/team",
|
|
3517
3696
|
name: "team",
|
|
3518
3697
|
component: wr,
|
|
3519
|
-
meta:
|
|
3698
|
+
meta: ae(S.Subject.Business.hrm_teamMember),
|
|
3520
3699
|
redirect: {
|
|
3521
3700
|
name: "team-member"
|
|
3522
3701
|
/* TEAM_MEMBER */
|
|
@@ -3530,7 +3709,7 @@ const Ae = (e) => ({
|
|
|
3530
3709
|
{
|
|
3531
3710
|
path: "role",
|
|
3532
3711
|
name: "team-role",
|
|
3533
|
-
component:
|
|
3712
|
+
component: Yr
|
|
3534
3713
|
}
|
|
3535
3714
|
]
|
|
3536
3715
|
},
|
|
@@ -3539,121 +3718,122 @@ const Ae = (e) => ({
|
|
|
3539
3718
|
name: "pos-grant",
|
|
3540
3719
|
component: Mr
|
|
3541
3720
|
}
|
|
3542
|
-
],
|
|
3721
|
+
], Gr = /* @__PURE__ */ z({
|
|
3543
3722
|
__name: "Navigator",
|
|
3544
3723
|
emits: ["close-navigation"],
|
|
3545
3724
|
setup(e, { emit: o }) {
|
|
3546
|
-
const c = o, { t: r } = je(),
|
|
3725
|
+
const c = o, { t: r } = je(), a = yt(), { sessionUser: n } = ue(), u = ie(() => {
|
|
3547
3726
|
var v;
|
|
3548
3727
|
const b = [];
|
|
3549
3728
|
return b.push({
|
|
3550
3729
|
label: r("hr.employee.title"),
|
|
3551
3730
|
value: "employee",
|
|
3552
3731
|
action: () => {
|
|
3553
|
-
|
|
3554
|
-
name:
|
|
3555
|
-
query:
|
|
3732
|
+
a.push({
|
|
3733
|
+
name: G.EMPLOYEE,
|
|
3734
|
+
query: a.currentRoute.value.query
|
|
3556
3735
|
}), c("close-navigation");
|
|
3557
3736
|
}
|
|
3558
3737
|
}), b.push({
|
|
3559
3738
|
label: r("team.title"),
|
|
3560
3739
|
value: "team-member",
|
|
3561
3740
|
action: () => {
|
|
3562
|
-
|
|
3563
|
-
name:
|
|
3564
|
-
query:
|
|
3741
|
+
a.push({
|
|
3742
|
+
name: G.TEAM,
|
|
3743
|
+
query: a.currentRoute.value.query
|
|
3565
3744
|
}), c("close-navigation");
|
|
3566
3745
|
}
|
|
3567
3746
|
}), b.push({
|
|
3568
3747
|
label: "Audit Log",
|
|
3569
3748
|
value: "audit-log",
|
|
3570
3749
|
action: () => {
|
|
3571
|
-
|
|
3572
|
-
name:
|
|
3750
|
+
a.push({
|
|
3751
|
+
name: G.AUDIT_LOG
|
|
3573
3752
|
}), c("close-navigation");
|
|
3574
3753
|
}
|
|
3575
3754
|
}), (v = n.value) != null && v.role.isAdmin && b.push({
|
|
3576
3755
|
label: r("grantUser.title"),
|
|
3577
3756
|
value: "pos-grant",
|
|
3578
3757
|
action: () => {
|
|
3579
|
-
|
|
3580
|
-
name:
|
|
3581
|
-
query:
|
|
3758
|
+
a.push({
|
|
3759
|
+
name: G.POS_GRANT,
|
|
3760
|
+
query: a.currentRoute.value.query
|
|
3582
3761
|
}), c("close-navigation");
|
|
3583
3762
|
}
|
|
3584
3763
|
}), b;
|
|
3585
3764
|
}), m = T();
|
|
3586
3765
|
return he(() => {
|
|
3587
3766
|
var v;
|
|
3588
|
-
let b = (v =
|
|
3767
|
+
let b = (v = a.currentRoute.value) == null ? void 0 : v.name;
|
|
3589
3768
|
switch (b) {
|
|
3590
|
-
case
|
|
3591
|
-
case
|
|
3592
|
-
case
|
|
3593
|
-
b =
|
|
3769
|
+
case G.EMPLOYEE:
|
|
3770
|
+
case G.ROLE:
|
|
3771
|
+
case G.TIMESHEET:
|
|
3772
|
+
b = G.EMPLOYEE;
|
|
3594
3773
|
break;
|
|
3595
|
-
case
|
|
3596
|
-
case
|
|
3597
|
-
b =
|
|
3774
|
+
case G.TEAM_MEMBER:
|
|
3775
|
+
case G.TEAM_ROLE:
|
|
3776
|
+
b = G.TEAM_MEMBER;
|
|
3598
3777
|
break;
|
|
3599
|
-
case
|
|
3600
|
-
b =
|
|
3778
|
+
case G.AUDIT_LOG:
|
|
3779
|
+
b = G.AUDIT_LOG;
|
|
3601
3780
|
break;
|
|
3602
|
-
case
|
|
3781
|
+
case G.POS_GRANT:
|
|
3603
3782
|
b = "pos-grant";
|
|
3604
3783
|
break;
|
|
3605
3784
|
default:
|
|
3606
|
-
b =
|
|
3785
|
+
b = G.EMPLOYEE;
|
|
3607
3786
|
}
|
|
3608
3787
|
m.value !== b && (m.value = b);
|
|
3609
3788
|
}), (b, v) => {
|
|
3610
3789
|
const D = le("FmCollapsibleTabs");
|
|
3611
3790
|
return W(), $(D, {
|
|
3612
3791
|
modelValue: m.value,
|
|
3613
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3792
|
+
"onUpdate:modelValue": v[0] || (v[0] = (y) => m.value = y),
|
|
3614
3793
|
items: u.value,
|
|
3615
3794
|
class: "py-16"
|
|
3616
3795
|
}, null, 8, ["modelValue", "items"]);
|
|
3617
3796
|
};
|
|
3618
3797
|
}
|
|
3619
|
-
}),
|
|
3798
|
+
}), Hr = /* @__PURE__ */ z({
|
|
3620
3799
|
__name: "App",
|
|
3621
3800
|
setup(e) {
|
|
3622
3801
|
const o = ue();
|
|
3623
3802
|
return Ve(() => {
|
|
3624
|
-
o.registerSidebarComponent(
|
|
3803
|
+
o.registerSidebarComponent(Gr);
|
|
3625
3804
|
}), (c, r) => {
|
|
3626
|
-
const
|
|
3627
|
-
return W(), $(
|
|
3805
|
+
const a = le("RouterView");
|
|
3806
|
+
return W(), $(a);
|
|
3628
3807
|
};
|
|
3629
3808
|
}
|
|
3630
|
-
}),
|
|
3631
|
-
const e = [Lt,
|
|
3809
|
+
}), Or = () => {
|
|
3810
|
+
const e = [Lt, Nt, qt, As], o = new Set(e.flatMap((c) => Object.keys(c)));
|
|
3632
3811
|
return Array.from(o).reduce(
|
|
3633
3812
|
(c, r) => {
|
|
3634
|
-
const
|
|
3813
|
+
const a = r;
|
|
3635
3814
|
return c[r] = e.reduce((n, u) => ({
|
|
3636
3815
|
...n,
|
|
3637
|
-
...u[
|
|
3816
|
+
...u[a] || {}
|
|
3638
3817
|
}), {}), c;
|
|
3639
3818
|
},
|
|
3640
3819
|
{}
|
|
3641
3820
|
);
|
|
3642
3821
|
};
|
|
3643
3822
|
export {
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3823
|
+
Qr as F,
|
|
3824
|
+
Fr as N,
|
|
3825
|
+
G as R,
|
|
3647
3826
|
Br as _,
|
|
3648
|
-
|
|
3649
|
-
|
|
3827
|
+
zs as a,
|
|
3828
|
+
Vs as b,
|
|
3650
3829
|
ns as c,
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3830
|
+
Or as d,
|
|
3831
|
+
Hr as e,
|
|
3832
|
+
Pr as f,
|
|
3654
3833
|
os as g,
|
|
3655
|
-
|
|
3834
|
+
qr as h,
|
|
3656
3835
|
w as i,
|
|
3657
|
-
|
|
3658
|
-
|
|
3836
|
+
Xr as r,
|
|
3837
|
+
S as u,
|
|
3838
|
+
s as y
|
|
3659
3839
|
};
|