@feedmepos/mf-hrm-portal 2.3.2-dev.3 → 2.3.2-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalCodeList-D3U4nvlF.js → ApprovalCodeList-NYJNwdDZ.js} +14 -15
- package/dist/{AuditLogList-qGCW7tf0.js → AuditLogList-Ghn4aBnn.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BxZ9t3MZ.js +459 -0
- package/dist/EmployeeList-jc8LTznV.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DLgm6oCz.js +90 -0
- package/dist/{GrantUserList-C71pal0N.js → GrantUserList-BtPTpypR.js} +15 -16
- package/dist/Main-BF8hlYeV.js +101 -0
- package/dist/{Main-CCdTWngg.js → Main-BizCV-_x.js} +11 -11
- package/dist/{Main-BWJPyEU1.js → Main-McMZU_cR.js} +5 -5
- package/dist/MyPosProfile-BjeCnBvL.js +290 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BS-oBunI.js → PermissionSetList-NWLoqFHC.js} +45 -46
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-UPcpeVD5.js +4243 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-nwpdr7T7.js +1831 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-eT-dPsOX.js +547 -0
- package/dist/RoleList-CIfN10zu.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CMTXC_UR.js} +1 -1
- package/dist/{ScheduleGeneralPage-DpNvWNGs.js → ScheduleGeneralPage-8vS1DUrk.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-Br4AcF1g.js} +187 -186
- package/dist/{SchedulePage-QW-cYvu2.js → SchedulePage-DqbE1PoV.js} +13 -13
- package/dist/{SchedulePositionPage-BtFfVo2N.js → SchedulePositionPage-DUnkT0Tp.js} +3 -3
- package/dist/{SelectFilter-BXeVKgHN.js → SelectFilter-voMj4_j1.js} +1 -1
- package/dist/TeamMemberList-DoEOWNDC.js +2086 -0
- package/dist/{TimesheetList-D-bESKe5.js → TimesheetList-BBv2SV96.js} +9 -9
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-h-bWBmpI.js} +3 -3
- package/dist/{app-D-MUq9Ab.js → app-CDCO87ji.js} +6389 -3455
- package/dist/app.js +3 -3
- package/dist/{approval-code-BXUiojPH.js → approval-code-CLE9s5dL.js} +1 -1
- package/dist/{dayjs.min-BZ1pM-6M.js → dayjs.min-BW6-XAUB.js} +21 -21
- package/dist/{employee-HQEU8fjb.js → employee-BaCU-FLC.js} +48 -47
- package/dist/{grant-user-CBJ3gEgW.js → grant-user-DMtilLJx.js} +1 -1
- package/dist/{iteration-ogxW2-Tv.js → iteration-CPLGGFBb.js} +1 -1
- package/dist/{lodash-Def4gaas.js → lodash-snXoiw60.js} +1 -1
- package/dist/member-grant-CJyOr-q0.js +55 -0
- package/dist/restaurant-BMlLIUqe.js +51 -0
- package/dist/{role-JDoDFVd9.js → role-DqcBOWHL.js} +5 -4
- package/dist/{rule-DPtqlnz-.js → rule-B5YNhGJ4.js} +105 -100
- package/dist/src/api/my-pos-profile/index.d.ts +3 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +16 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
- package/dist/src/composables/useMenuAccess.d.ts +56 -0
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
- package/dist/src/helpers/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- package/dist/src/helpers/staff-invite.d.ts +54 -0
- package/dist/src/helpers/string.d.ts +10 -1
- package/dist/src/router/menu-access-guard.d.ts +17 -0
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +30 -0
- package/dist/src/types/my-pos-profile.d.ts +24 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/staff-invite.d.ts +100 -0
- package/dist/src/types/team.d.ts +17 -1
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +196 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
- package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
- package/dist/src/views/team/locales/index.d.ts +716 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
- package/dist/string-DZQ1uNjn.js +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DZCdxlCd.js → useAppStore-pKAGQL6q.js} +1 -1
- package/dist/{useLoading-Nygx2zn8.js → useLoading-D67DIqfk.js} +1 -1
- package/dist/{useReportPermissions-CxV7Dz1B.js → useReportPermissions-CfgnE0NY.js} +5 -5
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +0 -438
- package/dist/EmployeeList-Bd73xDCX.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-DGf0bQvy.js +0 -96
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +0 -4167
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +0 -35
- package/dist/RoleList-B_7UnVNb.js +0 -740
- package/dist/TeamMemberList-DoisBYnk.js +0 -1154
- package/dist/restaurant-D2mfKHaH.js +0 -1880
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { defineComponent as re, ref as K, computed as g, resolveComponent as b, createBlock as O, openBlock as _, withCtx as $, createElementVNode as s, createElementBlock as S, createCommentVNode as Y, toDisplayString as C, unref as a, Fragment as H, renderList as te, createVNode as c, renderSlot as xe, isRef as ue, withModifiers as de, createTextVNode as be, normalizeClass as ke, h as x } from "vue";
|
|
2
|
-
import { d as Ve } from "./dayjs.min-
|
|
2
|
+
import { d as Ve } from "./dayjs.min-BW6-XAUB.js";
|
|
3
3
|
import { useI18n as ne } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as ie, components as z, useDialog as we, useBreakpoints as Fe, FmButtonVariant as se } from "@feedmepos/ui-library";
|
|
5
|
-
import { S as q } from "./SelectFilter-
|
|
6
|
-
import { _ as $e } from "./app-
|
|
7
|
-
import { _ as pe, u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as ve } from "./useLoading-
|
|
10
|
-
import { u as fe } from "./approval-code-
|
|
11
|
-
import { u as ce } from "./restaurant-
|
|
12
|
-
import { _ as Be } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
5
|
+
import { S as q } from "./SelectFilter-voMj4_j1.js";
|
|
6
|
+
import { _ as $e } from "./app-CDCO87ji.js";
|
|
7
|
+
import { _ as Se, a as pe, u as Ae, H as Pe } from "./FormSection.vue_vue_type_script_setup_true_lang-DLgm6oCz.js";
|
|
8
|
+
import { _ as Be } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
|
|
9
|
+
import { u as ve } from "./useLoading-D67DIqfk.js";
|
|
10
|
+
import { u as fe } from "./approval-code-CLE9s5dL.js";
|
|
11
|
+
import { u as ce } from "./restaurant-BMlLIUqe.js";
|
|
13
12
|
function Ie(d) {
|
|
14
13
|
var e;
|
|
15
14
|
const r = (e = d.conditions) == null ? void 0 : e.adjustment;
|
|
@@ -264,7 +263,7 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
264
263
|
]),
|
|
265
264
|
default: $(() => [
|
|
266
265
|
s("div", He, [
|
|
267
|
-
c(
|
|
266
|
+
c(Se, {
|
|
268
267
|
title: a(i)("approvalCode.form.section")
|
|
269
268
|
}, {
|
|
270
269
|
default: $(() => [
|
|
@@ -382,7 +381,7 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
382
381
|
class: "text-xs"
|
|
383
382
|
}, Ct = {
|
|
384
383
|
class: "flex flex-col gap-4"
|
|
385
|
-
}, me = 10, gt = 2,
|
|
384
|
+
}, me = 10, gt = 2, Bt = /* @__PURE__ */ re({
|
|
386
385
|
__name: "ApprovalCodeList",
|
|
387
386
|
setup(d, {
|
|
388
387
|
expose: r
|
|
@@ -397,7 +396,7 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
397
396
|
}))), M = g(() => w.approvalCodes), {
|
|
398
397
|
searchKey: p,
|
|
399
398
|
filter: B
|
|
400
|
-
} =
|
|
399
|
+
} = Ae(), I = g(() => {
|
|
401
400
|
const t = {};
|
|
402
401
|
return i.value.forEach((o) => {
|
|
403
402
|
t[o._id] = o.profile.name;
|
|
@@ -647,7 +646,7 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
647
646
|
"onUpdate:modelValue": o[5] || (o[5] = (l) => ue(p) ? p.value = l : null),
|
|
648
647
|
autofocus: "",
|
|
649
648
|
placeholder: a(e)("approvalCode.search.placeholder")
|
|
650
|
-
}, null, 8, ["modelValue", "placeholder"])]), c(
|
|
649
|
+
}, null, 8, ["modelValue", "placeholder"])]), c(Pe), s("div", rt, [c(q, {
|
|
651
650
|
modelValue: V.value,
|
|
652
651
|
"onUpdate:modelValue": o[6] || (o[6] = (l) => V.value = l),
|
|
653
652
|
multiple: "",
|
|
@@ -715,7 +714,7 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
715
714
|
_: 1
|
|
716
715
|
})])]),
|
|
717
716
|
_: 1
|
|
718
|
-
})) : (_(), O(a(
|
|
717
|
+
})) : (_(), O(a(Be), {
|
|
719
718
|
key: 1,
|
|
720
719
|
title: a(e)("approvalCode.noData.title"),
|
|
721
720
|
subtitle: a(e)("approvalCode.noData.subtitle")
|
|
@@ -724,5 +723,5 @@ const je = { class: "pr-24" }, De = { class: "fm-typo-en-title-md-600" }, Re = {
|
|
|
724
723
|
}
|
|
725
724
|
});
|
|
726
725
|
export {
|
|
727
|
-
|
|
726
|
+
Bt as default
|
|
728
727
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as Vt, ref as S, computed as I, onMounted as Eo, onBeforeUnmount as No, watch as ie, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Oe, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as g, toDisplayString as l, unref as u, nextTick as Ro, onUnmounted as Uo, createTextVNode as Ae, normalizeClass as Ko } from "vue";
|
|
2
|
-
import { d as O } from "./dayjs.min-
|
|
2
|
+
import { d as O } from "./dayjs.min-BW6-XAUB.js";
|
|
3
3
|
import { defineStore as Bo, storeToRefs as Yo } from "pinia";
|
|
4
4
|
import { useI18n as $t, useCoreStore as zo } from "@feedmepos/mf-common";
|
|
5
|
-
import { B as Ft, _ as qo, a as Jo } from "./app-
|
|
5
|
+
import { g as st, b as at, B as Ft, _ as qo, a as Jo } from "./app-CDCO87ji.js";
|
|
6
6
|
import { components as ve } from "@feedmepos/ui-library";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { _ as Wo } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { S as Fe } from "./SelectFilter-voMj4_j1.js";
|
|
8
|
+
import { _ as Ho } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
+
import { _ as Wo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
10
|
+
import { t as Go, p as Mt } from "./rule-B5YNhGJ4.js";
|
|
11
|
+
import { u as Xo } from "./restaurant-BMlLIUqe.js";
|
|
12
12
|
import { u as Qo } from "./useDebounce-B8ZPVS5C.js";
|
|
13
|
-
import { n as Zo } from "./string-
|
|
13
|
+
import { n as Zo } from "./string-DZQ1uNjn.js";
|
|
14
14
|
const es = {
|
|
15
15
|
order: "Order",
|
|
16
16
|
refund: "Refund",
|
|
@@ -261,7 +261,7 @@ const es = {
|
|
|
261
261
|
if (!(!y && t.value.length > 0))
|
|
262
262
|
try {
|
|
263
263
|
o.value = !0;
|
|
264
|
-
const A = await
|
|
264
|
+
const A = await Go.readTeamMembers();
|
|
265
265
|
t.value = A.sort((C, i) => C.doc.isOwner ? -1 : C.name.localeCompare(i.name)), n.value = !0;
|
|
266
266
|
} finally {
|
|
267
267
|
o.value = !1;
|
|
@@ -801,7 +801,7 @@ const Ss = {
|
|
|
801
801
|
const {
|
|
802
802
|
t: o,
|
|
803
803
|
te: n
|
|
804
|
-
} = $t(), r = zo(), d = ls(), h =
|
|
804
|
+
} = $t(), r = zo(), d = ls(), h = Xo(), {
|
|
805
805
|
restaurants: b
|
|
806
806
|
} = Yo(h), y = S(!1), A = S(!1), C = S([]), i = S(null), V = S(!1), R = S({}), m = S(null), w = S(!1);
|
|
807
807
|
async function j(e) {
|
|
@@ -1722,7 +1722,7 @@ const Ss = {
|
|
|
1722
1722
|
deep: !0
|
|
1723
1723
|
}), (e, s) => {
|
|
1724
1724
|
const c = N("FmSpacer"), x = N("FmButton"), L = N("FmMenuItem"), M = N("FmMenu"), E = N("FmChip"), re = N("FmDateRangePicker"), Re = N("FmSearch"), ke = N("FmTable"), Ue = N("FmIcon"), tt = N("FmTooltip"), we = N("FmSideSheet");
|
|
1725
|
-
return f(), v(z, null, [g(
|
|
1725
|
+
return f(), v(z, null, [g(Ho, {
|
|
1726
1726
|
heading: u(o)("auditLog.title")
|
|
1727
1727
|
}, {
|
|
1728
1728
|
"append-heading": Y(() => [g(c), g(x, {
|
|
@@ -1821,7 +1821,7 @@ const Ss = {
|
|
|
1821
1821
|
class: "ml-auto w-[280px]",
|
|
1822
1822
|
placeholder: u(o)("auditLog.search.placeholder")
|
|
1823
1823
|
}, null, 8, ["modelValue", "placeholder"])])]), g(qo, null, {
|
|
1824
|
-
default: Y(() => [a("div", js, [g(
|
|
1824
|
+
default: Y(() => [a("div", js, [g(Wo, {
|
|
1825
1825
|
"is-loading": y.value,
|
|
1826
1826
|
"is-empty": C.value.length === 0,
|
|
1827
1827
|
title: u(o)("auditLog.noData.title"),
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { defineComponent as B, ref as S, onMounted as le, nextTick as ue, onUnmounted as re, resolveComponent as g, createElementBlock as b, openBlock as u, Fragment as C, createElementVNode as U, createVNode as A, renderSlot as T, createCommentVNode as w, toDisplayString as E, normalizeStyle as se, normalizeClass as X, watch as q, defineAsyncComponent as ie, computed as K, renderList as M, createBlock as h, withCtx as j, unref as D, resolveDynamicComponent as de } from "vue";
|
|
2
|
+
import { useI18n as Y, useCoreStore as me } from "@feedmepos/mf-common";
|
|
3
|
+
import { s as L, G as ce, U as W } from "./app-CDCO87ji.js";
|
|
4
|
+
import { l as fe } from "./lodash-snXoiw60.js";
|
|
5
|
+
const ye = { class: "flex min-w-0 flex-col gap-4" }, be = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
8
|
+
}, ve = { class: "flex items-center" }, pe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
11
|
+
}, ke = { class: "ml-auto" }, Ie = /* @__PURE__ */ B({
|
|
12
|
+
__name: "CollapsibleWrapper",
|
|
13
|
+
props: {
|
|
14
|
+
title: { default: "" },
|
|
15
|
+
subtitle: { default: "" },
|
|
16
|
+
initiallyCollapsed: { type: Boolean, default: !1 },
|
|
17
|
+
layout: { default: "trailing" }
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const o = S(e.initiallyCollapsed), c = S(), f = S(0);
|
|
21
|
+
let m;
|
|
22
|
+
function V() {
|
|
23
|
+
o.value = !o.value;
|
|
24
|
+
}
|
|
25
|
+
function d() {
|
|
26
|
+
c.value && (f.value = c.value.scrollHeight);
|
|
27
|
+
}
|
|
28
|
+
return le(async () => {
|
|
29
|
+
await ue(), c.value && (m = new ResizeObserver(() => {
|
|
30
|
+
d();
|
|
31
|
+
}), m.observe(c.value));
|
|
32
|
+
}), re(() => {
|
|
33
|
+
m == null || m.disconnect();
|
|
34
|
+
}), (v, s) => {
|
|
35
|
+
const y = g("FmIcon"), p = g("FmButton");
|
|
36
|
+
return u(), b(C, null, [
|
|
37
|
+
e.layout === "leading" ? (u(), b("div", {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: "flex cursor-pointer items-start gap-8 py-4",
|
|
40
|
+
onClick: V
|
|
41
|
+
}, [
|
|
42
|
+
A(y, {
|
|
43
|
+
name: o.value ? "chevron_right" : "expand_more",
|
|
44
|
+
size: "md",
|
|
45
|
+
class: "shrink-0 text-fm-color-typo-primary"
|
|
46
|
+
}, null, 8, ["name"]),
|
|
47
|
+
U("div", ye, [
|
|
48
|
+
T(v.$slots, "title"),
|
|
49
|
+
e.subtitle ? (u(), b("span", be, E(e.subtitle), 1)) : w("", !0)
|
|
50
|
+
])
|
|
51
|
+
])) : (u(), b("div", {
|
|
52
|
+
key: 1,
|
|
53
|
+
onClick: V
|
|
54
|
+
}, [
|
|
55
|
+
U("div", ve, [
|
|
56
|
+
T(v.$slots, "title"),
|
|
57
|
+
o.value && e.subtitle ? (u(), b("span", pe, E(e.subtitle), 1)) : w("", !0),
|
|
58
|
+
U("div", ke, [
|
|
59
|
+
A(p, {
|
|
60
|
+
icon: o.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
|
|
61
|
+
"text-color": "neutral-gray-400",
|
|
62
|
+
variant: "tertiary",
|
|
63
|
+
size: "md"
|
|
64
|
+
}, null, 8, ["icon"])
|
|
65
|
+
])
|
|
66
|
+
])
|
|
67
|
+
])),
|
|
68
|
+
U("div", {
|
|
69
|
+
ref_key: "contentRef",
|
|
70
|
+
ref: c,
|
|
71
|
+
class: X(["transition-all duration-300 ease-in-out overflow-hidden", { "pl-32": e.layout === "leading" }]),
|
|
72
|
+
style: se({ maxHeight: o.value ? "0" : f.value + "px" })
|
|
73
|
+
}, [
|
|
74
|
+
T(v.$slots, "default")
|
|
75
|
+
], 6)
|
|
76
|
+
], 64);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
function z(e) {
|
|
81
|
+
return `${e.subject}::${e.builderKey}`;
|
|
82
|
+
}
|
|
83
|
+
function $e(e) {
|
|
84
|
+
const r = S(/* @__PURE__ */ new Map());
|
|
85
|
+
function o(s, y) {
|
|
86
|
+
const p = new Map(r.value);
|
|
87
|
+
p.set(z(s), y), r.value = p;
|
|
88
|
+
}
|
|
89
|
+
function c(s) {
|
|
90
|
+
return r.value.get(z(s));
|
|
91
|
+
}
|
|
92
|
+
function f(s) {
|
|
93
|
+
for (const y of r.value.keys())
|
|
94
|
+
if (y.startsWith(`${s}::`)) return !0;
|
|
95
|
+
return !1;
|
|
96
|
+
}
|
|
97
|
+
function m(s) {
|
|
98
|
+
const y = /* @__PURE__ */ new Map();
|
|
99
|
+
for (const [p, O] of r.value.entries())
|
|
100
|
+
p.startsWith(`${s}::`) && y.set(p, O);
|
|
101
|
+
return y;
|
|
102
|
+
}
|
|
103
|
+
function V(s) {
|
|
104
|
+
const y = new Map(r.value);
|
|
105
|
+
for (const p of Array.from(y.keys()))
|
|
106
|
+
p.startsWith(`${s}::`) && y.delete(p);
|
|
107
|
+
r.value = y;
|
|
108
|
+
}
|
|
109
|
+
function d() {
|
|
110
|
+
r.value = /* @__PURE__ */ new Map();
|
|
111
|
+
}
|
|
112
|
+
function v(s) {
|
|
113
|
+
const y = new Map(r.value);
|
|
114
|
+
y.delete(z(s)), r.value = y;
|
|
115
|
+
}
|
|
116
|
+
return e && q(
|
|
117
|
+
e,
|
|
118
|
+
() => {
|
|
119
|
+
d();
|
|
120
|
+
},
|
|
121
|
+
{ deep: !0 }
|
|
122
|
+
), {
|
|
123
|
+
drafts: r,
|
|
124
|
+
setDraft: o,
|
|
125
|
+
getDraft: c,
|
|
126
|
+
hasDraftsForSubject: f,
|
|
127
|
+
getDraftsForSubject: m,
|
|
128
|
+
clearDraftsForSubject: V,
|
|
129
|
+
clearAllDrafts: d,
|
|
130
|
+
clearDraft: v
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
const he = {}, Z = /* @__PURE__ */ new Map();
|
|
134
|
+
function ge(e) {
|
|
135
|
+
const r = Z.get(e);
|
|
136
|
+
if (r) return r;
|
|
137
|
+
const o = he[e];
|
|
138
|
+
if (!o) return;
|
|
139
|
+
const c = ie(o);
|
|
140
|
+
return Z.set(e, c), c;
|
|
141
|
+
}
|
|
142
|
+
function Ve(e, r) {
|
|
143
|
+
return !fe.isEqual(e, r);
|
|
144
|
+
}
|
|
145
|
+
const Fe = { class: "flex flex-col gap-8" }, Ce = { class: "flex flex-col gap-4" }, xe = "condition-form-select-menu", J = 120, De = 220, Ue = /* @__PURE__ */ B({
|
|
146
|
+
__name: "ConditionFormRenderer",
|
|
147
|
+
props: {
|
|
148
|
+
config: {},
|
|
149
|
+
modelValue: {},
|
|
150
|
+
disabled: { type: Boolean, default: !1 },
|
|
151
|
+
optionProviders: { default: () => ({}) }
|
|
152
|
+
},
|
|
153
|
+
emits: ["update:modelValue"],
|
|
154
|
+
setup(e, { emit: r }) {
|
|
155
|
+
const o = e, c = r, { t: f } = Y(), m = me(), V = K(() => L(o.config, o.modelValue));
|
|
156
|
+
let d = o.modelValue;
|
|
157
|
+
q(
|
|
158
|
+
() => o.modelValue,
|
|
159
|
+
(t) => {
|
|
160
|
+
d = t;
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
function v(t) {
|
|
164
|
+
return "static" in t ? t.static.map((n) => ({ value: n.value, label: f(n.labelKey) })) : o.optionProviders[t.provider] ?? [];
|
|
165
|
+
}
|
|
166
|
+
function s(t, n) {
|
|
167
|
+
const l = y(
|
|
168
|
+
ce(o.config, { ...o.modelValue, [t]: n })
|
|
169
|
+
);
|
|
170
|
+
Ve(l, d) && (d = l, c("update:modelValue", l));
|
|
171
|
+
}
|
|
172
|
+
function y(t) {
|
|
173
|
+
const n = { ...t };
|
|
174
|
+
for (const l of L(o.config, n))
|
|
175
|
+
l.kind === "date" && !n[l.key] && (n[l.key] = G(Q()));
|
|
176
|
+
return n;
|
|
177
|
+
}
|
|
178
|
+
function p() {
|
|
179
|
+
const t = m.currentBusiness.value;
|
|
180
|
+
if (t != null && t.timezone) return t.timezone;
|
|
181
|
+
if (t != null && t.timeZone) return t.timeZone;
|
|
182
|
+
const n = (t == null ? void 0 : t.country) ?? (m.currentCountry.value instanceof Object ? m.currentCountry.value.code : m.currentCountry.value);
|
|
183
|
+
return O(n);
|
|
184
|
+
}
|
|
185
|
+
function O(t) {
|
|
186
|
+
switch ((t || "").toUpperCase()) {
|
|
187
|
+
case "MY":
|
|
188
|
+
return "Asia/Kuala_Lumpur";
|
|
189
|
+
case "SG":
|
|
190
|
+
return "Asia/Singapore";
|
|
191
|
+
case "TH":
|
|
192
|
+
return "Asia/Bangkok";
|
|
193
|
+
case "ID":
|
|
194
|
+
return "Asia/Jakarta";
|
|
195
|
+
case "MO":
|
|
196
|
+
return "Asia/Macau";
|
|
197
|
+
case "BN":
|
|
198
|
+
return "Asia/Brunei";
|
|
199
|
+
case "PK":
|
|
200
|
+
return "Asia/Karachi";
|
|
201
|
+
case "MV":
|
|
202
|
+
return "Indian/Maldives";
|
|
203
|
+
case "VN":
|
|
204
|
+
return "Asia/Ho_Chi_Minh";
|
|
205
|
+
case "JP":
|
|
206
|
+
return "Asia/Tokyo";
|
|
207
|
+
case "AU":
|
|
208
|
+
return "Australia/Sydney";
|
|
209
|
+
case "AE":
|
|
210
|
+
return "Asia/Dubai";
|
|
211
|
+
case "UK":
|
|
212
|
+
return "Europe/London";
|
|
213
|
+
default:
|
|
214
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function R(t, n) {
|
|
218
|
+
const l = new Intl.DateTimeFormat("en-CA", {
|
|
219
|
+
timeZone: n,
|
|
220
|
+
year: "numeric",
|
|
221
|
+
month: "2-digit",
|
|
222
|
+
day: "2-digit",
|
|
223
|
+
hour: "2-digit",
|
|
224
|
+
minute: "2-digit",
|
|
225
|
+
second: "2-digit",
|
|
226
|
+
hourCycle: "h23"
|
|
227
|
+
}).formatToParts(t), k = Object.fromEntries(
|
|
228
|
+
l.filter((F) => F.type !== "literal").map((F) => [F.type, F.value])
|
|
229
|
+
);
|
|
230
|
+
return {
|
|
231
|
+
year: Number(k.year),
|
|
232
|
+
month: Number(k.month),
|
|
233
|
+
day: Number(k.day),
|
|
234
|
+
hour: Number(k.hour),
|
|
235
|
+
minute: Number(k.minute),
|
|
236
|
+
second: Number(k.second)
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function P(t, n) {
|
|
240
|
+
try {
|
|
241
|
+
const l = R(n, t);
|
|
242
|
+
return (Date.UTC(
|
|
243
|
+
l.year,
|
|
244
|
+
l.month - 1,
|
|
245
|
+
l.day,
|
|
246
|
+
l.hour,
|
|
247
|
+
l.minute,
|
|
248
|
+
l.second
|
|
249
|
+
) - n.getTime()) / 6e4;
|
|
250
|
+
} catch {
|
|
251
|
+
return 0;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function G(t) {
|
|
255
|
+
const [n, l, k] = t.split("-").map(Number);
|
|
256
|
+
if (!n || !l || !k) return "";
|
|
257
|
+
const F = p(), x = new Date(Date.UTC(n, l - 1, k, 0, 0, 0, 0)), $ = P(F, x), N = new Date(x.getTime() - $ * 6e4), _ = P(F, N);
|
|
258
|
+
return new Date(x.getTime() - _ * 6e4).toISOString();
|
|
259
|
+
}
|
|
260
|
+
function H(t) {
|
|
261
|
+
const n = new Date(t);
|
|
262
|
+
if (Number.isNaN(n.getTime())) return "";
|
|
263
|
+
try {
|
|
264
|
+
const l = R(n, p());
|
|
265
|
+
return `${String(l.year).padStart(4, "0")}-${String(l.month).padStart(2, "0")}-${String(l.day).padStart(2, "0")}`;
|
|
266
|
+
} catch {
|
|
267
|
+
return t.slice(0, 10);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function Q() {
|
|
271
|
+
return H((/* @__PURE__ */ new Date()).toISOString());
|
|
272
|
+
}
|
|
273
|
+
function I(t) {
|
|
274
|
+
return "options" in t ? v(t.options) : [];
|
|
275
|
+
}
|
|
276
|
+
function ee(t) {
|
|
277
|
+
const n = o.modelValue[t];
|
|
278
|
+
return n == null ? "" : String(n);
|
|
279
|
+
}
|
|
280
|
+
function te(t) {
|
|
281
|
+
const n = o.modelValue[t];
|
|
282
|
+
return typeof n != "string" || !n ? "" : H(n);
|
|
283
|
+
}
|
|
284
|
+
function ne(t, n) {
|
|
285
|
+
s(t, n ? G(n) : "");
|
|
286
|
+
}
|
|
287
|
+
function oe(t, n) {
|
|
288
|
+
let l = Math.floor(Number(n) || (t.min ?? 0));
|
|
289
|
+
t.min !== void 0 && (l = Math.max(t.min, l)), t.max !== void 0 && (l = Math.min(t.max, l)), s(t.key, l);
|
|
290
|
+
}
|
|
291
|
+
return (t, n) => {
|
|
292
|
+
const l = g("FmRadio"), k = g("FmRadioGroup"), F = g("FmSelect"), x = g("FmTextField"), $ = g("FmDatePicker"), N = g("FmCheckbox"), _ = g("FmFormGroup");
|
|
293
|
+
return u(), b("div", Fe, [
|
|
294
|
+
(u(!0), b(C, null, M(V.value, (a) => (u(), b(C, {
|
|
295
|
+
key: a.key
|
|
296
|
+
}, [
|
|
297
|
+
a.kind === "radio" ? (u(), h(k, {
|
|
298
|
+
key: 0,
|
|
299
|
+
"model-value": e.modelValue[a.key],
|
|
300
|
+
disabled: e.disabled,
|
|
301
|
+
"onUpdate:modelValue": (i) => s(a.key, i)
|
|
302
|
+
}, {
|
|
303
|
+
default: j(() => [
|
|
304
|
+
(u(!0), b(C, null, M(I(a), (i) => (u(), h(l, {
|
|
305
|
+
key: i.value,
|
|
306
|
+
value: i.value,
|
|
307
|
+
label: i.label
|
|
308
|
+
}, null, 8, ["value", "label"]))), 128))
|
|
309
|
+
]),
|
|
310
|
+
_: 2
|
|
311
|
+
}, 1032, ["model-value", "disabled", "onUpdate:modelValue"])) : a.kind === "select" ? (u(), h(F, {
|
|
312
|
+
key: 1,
|
|
313
|
+
"model-value": e.modelValue[a.key],
|
|
314
|
+
label: D(f)(a.labelKey),
|
|
315
|
+
items: I(a),
|
|
316
|
+
"menu-id": xe,
|
|
317
|
+
"menu-z-index": J,
|
|
318
|
+
"max-height": De,
|
|
319
|
+
"shift-menu": "",
|
|
320
|
+
placement: "bottom-start",
|
|
321
|
+
disabled: e.disabled,
|
|
322
|
+
"onUpdate:modelValue": (i) => s(a.key, i)
|
|
323
|
+
}, null, 8, ["model-value", "label", "items", "disabled", "onUpdate:modelValue"])) : a.kind === "number" ? (u(), h(x, {
|
|
324
|
+
key: 2,
|
|
325
|
+
"model-value": ee(a.key),
|
|
326
|
+
type: "number",
|
|
327
|
+
class: "!w-[120px] ml-32",
|
|
328
|
+
label: D(f)(a.labelKey),
|
|
329
|
+
disabled: e.disabled,
|
|
330
|
+
"onUpdate:modelValue": (i) => oe(a, i)
|
|
331
|
+
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "text" ? (u(), h(x, {
|
|
332
|
+
key: 3,
|
|
333
|
+
"model-value": e.modelValue[a.key] ?? "",
|
|
334
|
+
label: D(f)(a.labelKey),
|
|
335
|
+
disabled: e.disabled,
|
|
336
|
+
"onUpdate:modelValue": (i) => s(a.key, i)
|
|
337
|
+
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "date" ? (u(), h($, {
|
|
338
|
+
key: 4,
|
|
339
|
+
"model-value": te(a.key),
|
|
340
|
+
label: D(f)(a.labelKey),
|
|
341
|
+
"z-index": J,
|
|
342
|
+
disabled: e.disabled,
|
|
343
|
+
"onUpdate:modelValue": (i) => ne(a.key, i)
|
|
344
|
+
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "switch" ? (u(), h(N, {
|
|
345
|
+
key: 5,
|
|
346
|
+
"model-value": !!e.modelValue[a.key],
|
|
347
|
+
value: !0,
|
|
348
|
+
label: D(f)(a.labelKey),
|
|
349
|
+
disabled: e.disabled,
|
|
350
|
+
"onUpdate:modelValue": (i) => s(a.key, i)
|
|
351
|
+
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : a.kind === "multiselect" ? (u(), h(_, {
|
|
352
|
+
key: 6,
|
|
353
|
+
"model-value": e.modelValue[a.key] ?? [],
|
|
354
|
+
"onUpdate:modelValue": (i) => s(a.key, i)
|
|
355
|
+
}, {
|
|
356
|
+
default: j(() => [
|
|
357
|
+
U("div", Ce, [
|
|
358
|
+
(u(!0), b(C, null, M(I(a), (i) => (u(), h(N, {
|
|
359
|
+
key: i.value,
|
|
360
|
+
"model-value": e.modelValue[a.key] ?? [],
|
|
361
|
+
value: i.value,
|
|
362
|
+
label: i.label,
|
|
363
|
+
disabled: e.disabled,
|
|
364
|
+
"onUpdate:modelValue": (ae) => s(a.key, ae)
|
|
365
|
+
}, null, 8, ["model-value", "value", "label", "disabled", "onUpdate:modelValue"]))), 128))
|
|
366
|
+
])
|
|
367
|
+
]),
|
|
368
|
+
_: 2
|
|
369
|
+
}, 1032, ["model-value", "onUpdate:modelValue"])) : w("", !0)
|
|
370
|
+
], 64))), 128))
|
|
371
|
+
]);
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
}), we = /* @__PURE__ */ B({
|
|
375
|
+
__name: "ConditionFormHost",
|
|
376
|
+
props: {
|
|
377
|
+
builder: {},
|
|
378
|
+
modelValue: {},
|
|
379
|
+
disable: { type: Boolean, default: !1 },
|
|
380
|
+
optionProviders: { default: () => ({}) }
|
|
381
|
+
},
|
|
382
|
+
emits: ["update:modelValue"],
|
|
383
|
+
setup(e, { emit: r }) {
|
|
384
|
+
const o = e, c = r, f = K(
|
|
385
|
+
() => o.builder.form && W(o.builder.form) ? o.builder.form : void 0
|
|
386
|
+
), m = K(
|
|
387
|
+
() => o.builder.form && !W(o.builder.form) ? ge(o.builder.form.component) : void 0
|
|
388
|
+
);
|
|
389
|
+
return (V, d) => f.value ? (u(), h(Ue, {
|
|
390
|
+
key: 0,
|
|
391
|
+
config: f.value,
|
|
392
|
+
"model-value": e.modelValue ?? f.value.defaults,
|
|
393
|
+
disabled: e.disable,
|
|
394
|
+
"option-providers": e.optionProviders,
|
|
395
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => c("update:modelValue", v))
|
|
396
|
+
}, null, 8, ["config", "model-value", "disabled", "option-providers"])) : m.value ? (u(), h(de(m.value), {
|
|
397
|
+
key: 1,
|
|
398
|
+
"model-value": e.modelValue,
|
|
399
|
+
disable: e.disable,
|
|
400
|
+
"onUpdate:modelValue": d[1] || (d[1] = (v) => c("update:modelValue", v))
|
|
401
|
+
}, null, 8, ["model-value", "disable"])) : w("", !0);
|
|
402
|
+
}
|
|
403
|
+
}), Ne = {
|
|
404
|
+
key: 0,
|
|
405
|
+
class: "fm-typo-en-title-sm-600"
|
|
406
|
+
}, Se = {
|
|
407
|
+
key: 0,
|
|
408
|
+
class: "h-px w-full bg-fm-color-neutral-gray-200"
|
|
409
|
+
}, Te = { class: "flex justify-end pt-8" }, _e = /* @__PURE__ */ B({
|
|
410
|
+
__name: "ConditionBuilderForm",
|
|
411
|
+
props: {
|
|
412
|
+
builders: {},
|
|
413
|
+
formValueFor: {},
|
|
414
|
+
hasChanges: { type: Boolean },
|
|
415
|
+
title: { default: "" },
|
|
416
|
+
disable: { type: Boolean, default: !1 },
|
|
417
|
+
fullWidth: { type: Boolean, default: !1 }
|
|
418
|
+
},
|
|
419
|
+
emits: ["update-form", "apply"],
|
|
420
|
+
setup(e, { emit: r }) {
|
|
421
|
+
const o = r, { t: c } = Y();
|
|
422
|
+
return (f, m) => {
|
|
423
|
+
const V = g("FmButton");
|
|
424
|
+
return u(), b("div", {
|
|
425
|
+
class: X(["flex flex-col gap-12 p-16", e.fullWidth ? "w-full" : "w-[320px]"])
|
|
426
|
+
}, [
|
|
427
|
+
e.title ? (u(), b("p", Ne, E(e.title), 1)) : w("", !0),
|
|
428
|
+
(u(!0), b(C, null, M(e.builders, (d, v) => (u(), b(C, {
|
|
429
|
+
key: d.builderKey
|
|
430
|
+
}, [
|
|
431
|
+
v > 0 ? (u(), b("div", Se)) : w("", !0),
|
|
432
|
+
T(f.$slots, "section", { builder: d }, () => [
|
|
433
|
+
A(we, {
|
|
434
|
+
builder: d,
|
|
435
|
+
"model-value": e.formValueFor(d),
|
|
436
|
+
disable: e.disable,
|
|
437
|
+
"onUpdate:modelValue": (s) => o("update-form", { builder: d, form: s })
|
|
438
|
+
}, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
|
|
439
|
+
])
|
|
440
|
+
], 64))), 128)),
|
|
441
|
+
U("div", Te, [
|
|
442
|
+
A(V, {
|
|
443
|
+
label: D(c)("team.memberForm.permissions.conditionApply"),
|
|
444
|
+
size: "md",
|
|
445
|
+
variant: "primary",
|
|
446
|
+
disabled: e.disable || !e.hasChanges,
|
|
447
|
+
onClick: m[0] || (m[0] = (d) => o("apply"))
|
|
448
|
+
}, null, 8, ["label", "disabled"])
|
|
449
|
+
])
|
|
450
|
+
], 2);
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
export {
|
|
455
|
+
Ie as _,
|
|
456
|
+
_e as a,
|
|
457
|
+
we as b,
|
|
458
|
+
$e as u
|
|
459
|
+
};
|