@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-prod
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/Analytic-D8WCDkga.js +427 -0
- package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
- package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
- package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
- package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
- package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
- package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
- package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
- package/dist/Marketing-C7F4abzg.js +319 -0
- package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
- package/dist/MemberList-DFW2bMbr.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
- package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
- package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
- package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
- package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
- package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
- package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
- package/dist/Segment-DDQIzsrk.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
- package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
- package/dist/StoreRewards-D5zlE6cE.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
- package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
- package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
- package/dist/app.js +3 -4
- package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
- package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
- package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
- package/dist/campaign.fn-DJ6J98jS.js +758 -0
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
- package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
- package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
- package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
- package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
- package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
- package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
- package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
- package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D2uZzjpn.js +44 -0
- package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
- package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
- package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
- package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
- package/dist/objectid-Cr99eTPd.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
- package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
- package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
- package/package.json +3 -9
- package/dist/Analytic-BjSfI2Ff.js +0 -761
- package/dist/AuditLogs-DWCFYoRg.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-Dn9A1vgH.js +0 -20073
- package/dist/MemberList-BWTG9Ohy.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
- package/dist/Segment-Bzq-pyhc.js +0 -882
- package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
- package/dist/campaign.fn-BYZgKDN7.js +0 -758
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-CwsMG2cV.js +0 -56
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -2,18 +2,18 @@ var q = Object.defineProperty;
|
|
|
2
2
|
var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
|
|
3
3
|
var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
|
|
4
4
|
import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
|
|
5
|
-
import { u as oe, _ as ae } from "./usePagination-
|
|
6
|
-
import { g as A } from "./user-
|
|
5
|
+
import { u as oe, _ as ae } from "./usePagination-JoYaROkV.js";
|
|
6
|
+
import { g as A } from "./user-DhV5Iy52.js";
|
|
7
7
|
import { components as R } from "@feedmepos/ui-library";
|
|
8
|
-
import "./index-
|
|
9
|
-
import { u as j } from "./vue-i18n-
|
|
10
|
-
import { u as L } from "./loading-
|
|
8
|
+
import "./index-CIztuDE4.js";
|
|
9
|
+
import { u as j } from "./vue-i18n-BtvUK9hI.js";
|
|
10
|
+
import { u as L } from "./loading-BFkEqWR6.js";
|
|
11
11
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
12
|
-
import { r as v } from "./index-
|
|
12
|
+
import { r as v } from "./index-CBcbwf0k.js";
|
|
13
13
|
import { c as ie, a as ne } from "./object-qECH92oz.js";
|
|
14
|
-
import { u as ce } from "./membership-
|
|
15
|
-
import { a as le, c as de } from "./plugins-
|
|
16
|
-
import { u as V, w as me } from "./xlsx-
|
|
14
|
+
import { u as ce } from "./membership-D0eN3i_T.js";
|
|
15
|
+
import { a as le, c as de } from "./plugins-DK_ue6Xa.js";
|
|
16
|
+
import { u as V, w as me } from "./xlsx-WnLDq4qn.js";
|
|
17
17
|
import { e as f } from "./index-vh86FiIQ.js";
|
|
18
18
|
import { h as ue } from "./moment-BWErdI6_.js";
|
|
19
19
|
import { o as pe } from "./objectId-dwaoBfJX.js";
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
1
|
+
import { defineComponent as X, ref as h, computed as H, resolveComponent as f, openBlock as b, createBlock as U, unref as t, isRef as Z, withCtx as A, createElementVNode as w, createVNode as c, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as F, onMounted as q, toDisplayString as B } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as Q, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G } from "./loading-
|
|
5
|
-
import { u as J, C as ee } from "./membership-
|
|
6
|
-
import { f as j, p as te } from "./plugins-
|
|
7
|
-
import { u as oe } from "./vue-i18n-
|
|
4
|
+
import { u as G } from "./loading-BFkEqWR6.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-D0eN3i_T.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-DK_ue6Xa.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-BtvUK9hI.js";
|
|
8
8
|
import { c as ae } from "./object-qECH92oz.js";
|
|
9
|
-
import { Z as
|
|
10
|
-
import "./index-
|
|
11
|
-
import { F as N } from "./index-
|
|
12
|
-
import { useCoreStore as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
9
|
+
import { Z as O } from "./zod-Bg2FbC-D.js";
|
|
10
|
+
import "./index-DWdAUovq.js";
|
|
11
|
+
import { F as N } from "./index-B0YZKHyu.js";
|
|
12
|
+
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
|
13
|
+
import { _ as le, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js";
|
|
15
15
|
import { J as K } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { i as
|
|
18
|
-
import { u as
|
|
19
|
-
import "./index-
|
|
20
|
-
import { C as
|
|
21
|
-
import { e as me } from "./effect-
|
|
16
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js";
|
|
17
|
+
import { i as ce } from "./helper-BKZghMbF.js";
|
|
18
|
+
import { u as de, r as P } from "./reward-CW2dSLDW.js";
|
|
19
|
+
import "./index-BoR-BOFw.js";
|
|
20
|
+
import { C as pe } from "./campaign.fn-DJ6J98jS.js";
|
|
21
|
+
import { e as me } from "./effect-DnAVIDFy.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
24
|
-
const fe = { class: "flex gap-8 items-center justify-start" },
|
|
23
|
+
import { R as ye } from "./app-DuIzRGvb.js";
|
|
24
|
+
const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), we = { class: "flex gap-8 items-center justify-start" }, ve = /* @__PURE__ */ X({
|
|
25
25
|
__name: "EditRewardSheet",
|
|
26
26
|
emits: ["update"],
|
|
27
|
-
setup(W, { expose:
|
|
28
|
-
const
|
|
29
|
-
var
|
|
30
|
-
return ((
|
|
27
|
+
setup(W, { expose: l, emit: I }) {
|
|
28
|
+
const d = J(), { minor: C } = G, v = h(!1), o = h({}), y = h(), R = H(() => {
|
|
29
|
+
var n;
|
|
30
|
+
return ((n = o.value.option) == null ? void 0 : n.collectibleType) === "CREDIT" ? N.superRefine((e, a) => {
|
|
31
31
|
var i, m, g, r;
|
|
32
|
-
!((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) &&
|
|
32
|
+
!((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) && a.addIssue({
|
|
33
33
|
code: "custom",
|
|
34
34
|
path: [],
|
|
35
35
|
message: "Credit validity must be set"
|
|
36
36
|
});
|
|
37
37
|
}) : N;
|
|
38
38
|
}), u = H(() => {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const n = R.value.safeParse(o.value);
|
|
40
|
+
return n.success ? [] : n.error.errors;
|
|
41
41
|
});
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function _(n, e) {
|
|
43
|
+
n && (y.value = void 0, o.value = e), v.value = n;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const $ = I;
|
|
46
46
|
async function S() {
|
|
47
|
-
const
|
|
48
|
-
!
|
|
47
|
+
const n = R.value.safeParse(o.value);
|
|
48
|
+
!n.success || !n.data || (await C(
|
|
49
49
|
async () => {
|
|
50
50
|
var e;
|
|
51
|
-
|
|
52
|
-
((e =
|
|
51
|
+
n.data.option.type === "VOUCHER" && y.value && (n.data.option.collectibleConfig.image = await j.update(
|
|
52
|
+
((e = n.data.option.collectibleConfig) == null ? void 0 : e.image) || j.collectibleImagePath(void 0, y.value),
|
|
53
53
|
y.value
|
|
54
54
|
));
|
|
55
55
|
},
|
|
@@ -57,14 +57,14 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
57
57
|
message: "Uploading reward image",
|
|
58
58
|
successMessage: "Reward image updated"
|
|
59
59
|
}
|
|
60
|
-
),
|
|
60
|
+
), $("update", n.data));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
62
|
+
function x(n) {
|
|
63
|
+
n === "VOUCHER" ? o.value.option = {
|
|
64
64
|
collectible: null,
|
|
65
65
|
type: "VOUCHER",
|
|
66
|
-
collectibleConfig:
|
|
67
|
-
business:
|
|
66
|
+
collectibleConfig: ce("VOUCHER", {
|
|
67
|
+
business: ne().currentBusiness.value._id
|
|
68
68
|
}),
|
|
69
69
|
earningOption: {
|
|
70
70
|
amount: 1,
|
|
@@ -73,9 +73,9 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
73
73
|
validityOption: {
|
|
74
74
|
validForDay: 7
|
|
75
75
|
}
|
|
76
|
-
} :
|
|
77
|
-
collectible:
|
|
78
|
-
collectibleType:
|
|
76
|
+
} : o.value.option = {
|
|
77
|
+
collectible: d.loyaltyRewards.raw[0]._id,
|
|
78
|
+
collectibleType: d.loyaltyRewards.raw[0].type,
|
|
79
79
|
type: "LOYALTY",
|
|
80
80
|
earningOption: {
|
|
81
81
|
amount: 1,
|
|
@@ -86,17 +86,17 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
(e) => e._id ===
|
|
89
|
+
function D(n) {
|
|
90
|
+
o.value.option.collectible = n, o.value.option.collectibleType = d.loyaltyRewards.raw.find(
|
|
91
|
+
(e) => e._id === n
|
|
92
92
|
).type;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
showSheet:
|
|
97
|
-
}), (
|
|
98
|
-
const
|
|
99
|
-
return b(),
|
|
94
|
+
const T = h();
|
|
95
|
+
return l({
|
|
96
|
+
showSheet: _
|
|
97
|
+
}), (n, e) => {
|
|
98
|
+
const a = f("FmSelect"), i = f("FmForm"), m = f("FmButton"), g = f("FmSideSheet");
|
|
99
|
+
return b(), U(g, {
|
|
100
100
|
"max-width": 560,
|
|
101
101
|
modelValue: t(v),
|
|
102
102
|
"onUpdate:modelValue": [
|
|
@@ -106,15 +106,15 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
106
106
|
header: "Edit reward"
|
|
107
107
|
}, {
|
|
108
108
|
"side-sheet-footer": A(() => [
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
w("div", we, [
|
|
110
|
+
c(m, {
|
|
111
111
|
variant: "primary",
|
|
112
112
|
type: "button",
|
|
113
113
|
label: "Confirm",
|
|
114
114
|
disabled: t(u).length > 0,
|
|
115
115
|
onClick: e[6] || (e[6] = (r) => S())
|
|
116
116
|
}, null, 8, ["disabled"]),
|
|
117
|
-
|
|
117
|
+
c(m, {
|
|
118
118
|
variant: "secondary",
|
|
119
119
|
type: "button",
|
|
120
120
|
label: "Cancel",
|
|
@@ -123,87 +123,87 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
123
123
|
])
|
|
124
124
|
]),
|
|
125
125
|
default: A(() => [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
c(K, { json: t(o) }, null, 8, ["json"]),
|
|
127
|
+
c(i, {
|
|
128
128
|
class: "flex flex-col gap-y-24",
|
|
129
129
|
ref_key: "formRef",
|
|
130
|
-
ref:
|
|
130
|
+
ref: T,
|
|
131
131
|
onValidationSuccess: e[5] || (e[5] = (r) => S())
|
|
132
132
|
}, {
|
|
133
133
|
default: A(() => {
|
|
134
|
-
var r, E,
|
|
134
|
+
var r, E, p;
|
|
135
135
|
return [
|
|
136
|
-
|
|
137
|
-
modelValue: t(
|
|
138
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) => t(
|
|
136
|
+
c(se, {
|
|
137
|
+
modelValue: t(o).name,
|
|
138
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t(o).name = s),
|
|
139
139
|
label: "Reward Name",
|
|
140
|
-
schema: t(
|
|
141
|
-
"error-text": t(
|
|
140
|
+
schema: t(O).typeAtPath(t(R), "name", []),
|
|
141
|
+
"error-text": t(O).helperText(t(u), "name")
|
|
142
142
|
}, null, 8, ["modelValue", "schema", "error-text"]),
|
|
143
|
-
|
|
143
|
+
c(a, {
|
|
144
144
|
label: "Reward Type",
|
|
145
|
-
disabled: !!t(
|
|
145
|
+
disabled: !!t(o)._id,
|
|
146
146
|
items: [
|
|
147
147
|
{ label: "Voucher", value: "VOUCHER" },
|
|
148
148
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
149
149
|
],
|
|
150
|
-
"model-value": t(
|
|
151
|
-
"onUpdate:modelValue":
|
|
150
|
+
"model-value": t(o).option.type,
|
|
151
|
+
"onUpdate:modelValue": x
|
|
152
152
|
}, null, 8, ["disabled", "model-value"]),
|
|
153
|
-
t(
|
|
153
|
+
t(o).option.type == "LOYALTY" ? (b(), U(a, {
|
|
154
154
|
key: 0,
|
|
155
155
|
label: "Loyalty type",
|
|
156
|
-
items: t(
|
|
157
|
-
"model-value": t(
|
|
158
|
-
"onUpdate:modelValue":
|
|
156
|
+
items: t(d).loyaltyRewards.items,
|
|
157
|
+
"model-value": t(o).option.collectible,
|
|
158
|
+
"onUpdate:modelValue": D
|
|
159
159
|
}, null, 8, ["items", "model-value"])) : k("", !0),
|
|
160
|
-
t(
|
|
161
|
-
|
|
162
|
-
((r = t(
|
|
160
|
+
t(o).option.type === "LOYALTY" ? (b(), M(Y, { key: 1 }, [
|
|
161
|
+
fe,
|
|
162
|
+
((r = t(d).loyaltyRewards.items.find(
|
|
163
163
|
(s) => {
|
|
164
|
-
var
|
|
165
|
-
return s.value === ((
|
|
164
|
+
var V;
|
|
165
|
+
return s.value === ((V = t(o)) == null ? void 0 : V.option.collectible);
|
|
166
166
|
}
|
|
167
|
-
)) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(),
|
|
167
|
+
)) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(), U(le, {
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "mt-[-8px]",
|
|
170
170
|
rules: [
|
|
171
|
-
t(
|
|
172
|
-
t(
|
|
171
|
+
t(O).ruleAtPath(t(R), "option.earningOption", [
|
|
172
|
+
t(o).option.type
|
|
173
173
|
])
|
|
174
174
|
],
|
|
175
|
-
"helper-state": t(
|
|
176
|
-
"error-text": t(
|
|
175
|
+
"helper-state": t(O).helperState(t(u), "option.earningOption"),
|
|
176
|
+
"error-text": t(O).helperText(t(u), "option.earningOption"),
|
|
177
177
|
"fixed-type": !0,
|
|
178
|
-
"model-value": t(
|
|
179
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) => t(
|
|
178
|
+
"model-value": t(o).option.earningOption,
|
|
179
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t(o).option.earningOption = s)
|
|
180
180
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])) : k("", !0),
|
|
181
|
-
|
|
181
|
+
c(re, {
|
|
182
182
|
class: "!gap-24",
|
|
183
|
-
"for-credit": t(
|
|
183
|
+
"for-credit": t(o).option.type === "LOYALTY" && ((E = t(d).loyaltyRewards.items.find(
|
|
184
184
|
(s) => {
|
|
185
|
-
var
|
|
186
|
-
return s.value === ((
|
|
185
|
+
var V;
|
|
186
|
+
return s.value === ((V = t(o).option) == null ? void 0 : V.collectible);
|
|
187
187
|
}
|
|
188
188
|
)) == null ? void 0 : E.raw.type) === "CREDIT",
|
|
189
|
-
type: t(
|
|
189
|
+
type: t(o).option.type === "VOUCHER" ? "range" : "custom",
|
|
190
190
|
rules: [
|
|
191
|
-
t(
|
|
192
|
-
t(
|
|
191
|
+
t(O).ruleAtPath(t(R), "option.validityOption", [
|
|
192
|
+
t(o).option.type
|
|
193
193
|
])
|
|
194
194
|
],
|
|
195
|
-
"model-value": t(
|
|
196
|
-
"onUpdate:modelValue": e[2] || (e[2] = (s) => t(
|
|
195
|
+
"model-value": t(o).option.validityOption,
|
|
196
|
+
"onUpdate:modelValue": e[2] || (e[2] = (s) => t(o).option.validityOption = s)
|
|
197
197
|
}, null, 8, ["for-credit", "type", "rules", "model-value"])
|
|
198
198
|
], 64)) : k("", !0),
|
|
199
|
-
t(
|
|
199
|
+
t(o).option.type === "VOUCHER" ? (b(), U(ie, {
|
|
200
200
|
key: 2,
|
|
201
201
|
"reward-image": t(y),
|
|
202
|
-
"model-value": ((
|
|
203
|
-
"onUpdate:modelValue": e[3] || (e[3] = (s) => t(
|
|
202
|
+
"model-value": ((p = t(o)) == null ? void 0 : p.option.collectibleConfig) ?? void 0,
|
|
203
|
+
"onUpdate:modelValue": e[3] || (e[3] = (s) => t(o).option.collectibleConfig = s),
|
|
204
204
|
"onUpdate:rewardImage": e[4] || (e[4] = (s) => y.value = s)
|
|
205
205
|
}, null, 8, ["reward-image", "model-value"])) : k("", !0),
|
|
206
|
-
|
|
206
|
+
c(K, { json: t(u) }, null, 8, ["json"])
|
|
207
207
|
];
|
|
208
208
|
}),
|
|
209
209
|
_: 1
|
|
@@ -213,19 +213,22 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
213
213
|
}, 8, ["modelValue"]);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
216
|
+
}), ge = { class: "px-24 flex flex-col gap-y-16" }, be = { class: "flex items-center justify-between w-full" }, Re = /* @__PURE__ */ w("div", { class: "flex gap-8" }, null, -1), Ce = /* @__PURE__ */ w("img", {
|
|
217
|
+
src: z,
|
|
218
|
+
class: "aspect-square w-[150px]"
|
|
219
|
+
}, null, -1), _e = { class: "flex flex-col gap-16 text-center" }, Fe = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ X({
|
|
217
220
|
__name: "Reward",
|
|
218
221
|
setup(W) {
|
|
219
|
-
const { t:
|
|
220
|
-
label:
|
|
222
|
+
const { t: l } = oe(), I = {
|
|
223
|
+
label: l("connect.storeRewards.create"),
|
|
221
224
|
value: "create",
|
|
222
225
|
isPrimary: !0,
|
|
223
226
|
prependIcon: "add"
|
|
224
|
-
},
|
|
227
|
+
}, d = J(), C = de(), { global: v, minor: o } = G, y = ue(), R = Q(), u = h({
|
|
225
228
|
searchKey: "",
|
|
226
229
|
columnFilters: []
|
|
227
|
-
}),
|
|
228
|
-
function
|
|
230
|
+
}), _ = H(() => C.rewards);
|
|
231
|
+
function $(e) {
|
|
229
232
|
y.push({
|
|
230
233
|
name: ye["$connect-STORE_REWARD_COLLECTIONS"],
|
|
231
234
|
params: { id: e }
|
|
@@ -233,66 +236,66 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
233
236
|
}
|
|
234
237
|
const S = [
|
|
235
238
|
{
|
|
236
|
-
header:
|
|
239
|
+
header: l("connect.storeRewards.table.name"),
|
|
237
240
|
accessorFn: (e) => e.name
|
|
238
241
|
},
|
|
239
242
|
{
|
|
240
|
-
header:
|
|
243
|
+
header: l("connect.storeRewards.table.type"),
|
|
241
244
|
cell(e) {
|
|
242
245
|
return e.row.original.collectibleConfig ? ee[e.row.original.collectibleConfig.type].chip() : "N/A";
|
|
243
246
|
}
|
|
244
247
|
},
|
|
245
248
|
{
|
|
246
|
-
header:
|
|
249
|
+
header: l("connect.storeRewards.table.summary"),
|
|
247
250
|
accessorFn: (e) => {
|
|
248
|
-
var
|
|
251
|
+
var a, i;
|
|
249
252
|
if (e.option.type === "VOUCHER")
|
|
250
|
-
return me((i = (
|
|
253
|
+
return me((i = (a = e.option.collectibleConfig) == null ? void 0 : a.extras) == null ? void 0 : i.effect);
|
|
251
254
|
if (e.option.collectibleType == "TITLE") {
|
|
252
|
-
const m =
|
|
255
|
+
const m = d.sortedTitles.find(
|
|
253
256
|
(g) => g._id == e.option.collectible
|
|
254
257
|
);
|
|
255
258
|
return `Get ${m == null ? void 0 : m.name} valid for ${e.option.validityOption.validForDay} days`;
|
|
256
259
|
}
|
|
257
|
-
return `Get ${e.option.earningOption.amount} ${
|
|
260
|
+
return `Get ${e.option.earningOption.amount} ${pe.formattedType(e.option.collectibleType)}`;
|
|
258
261
|
}
|
|
259
262
|
},
|
|
260
263
|
{
|
|
261
|
-
header:
|
|
264
|
+
header: l("connect.storeRewards.table.actions"),
|
|
262
265
|
cell(e) {
|
|
263
|
-
return
|
|
264
|
-
|
|
266
|
+
return F("div", { class: "flex items-center justify-end gap-4" }, [
|
|
267
|
+
F(
|
|
265
268
|
L.FmMenu,
|
|
266
269
|
{
|
|
267
270
|
placement: "bottom-end",
|
|
268
|
-
onClick: (
|
|
269
|
-
|
|
271
|
+
onClick: (a) => {
|
|
272
|
+
a.stopPropagation();
|
|
270
273
|
}
|
|
271
274
|
},
|
|
272
275
|
{
|
|
273
|
-
"menu-button": () =>
|
|
276
|
+
"menu-button": () => F(L.FmButton, {
|
|
274
277
|
icon: "more_vert",
|
|
275
278
|
iconColor: "neutral-gray-400",
|
|
276
279
|
variant: "tertiary"
|
|
277
280
|
}),
|
|
278
281
|
default: () => [
|
|
279
|
-
e.row.original.option.type === "VOUCHER" &&
|
|
282
|
+
e.row.original.option.type === "VOUCHER" && F(L.FmMenuItem, {
|
|
280
283
|
label: "View collections",
|
|
281
|
-
onClick: async (
|
|
282
|
-
|
|
284
|
+
onClick: async (a) => {
|
|
285
|
+
a.stopPropagation(), $(
|
|
283
286
|
e.row.original.option.collectible
|
|
284
287
|
);
|
|
285
288
|
}
|
|
286
289
|
}),
|
|
287
|
-
|
|
290
|
+
F(
|
|
288
291
|
L.FmMenuItem,
|
|
289
292
|
{
|
|
290
|
-
onClick: async (
|
|
291
|
-
|
|
293
|
+
onClick: async (a) => {
|
|
294
|
+
a.stopPropagation(), D(e.row.original);
|
|
292
295
|
}
|
|
293
296
|
},
|
|
294
297
|
{
|
|
295
|
-
label:
|
|
298
|
+
label: F(
|
|
296
299
|
"div",
|
|
297
300
|
{
|
|
298
301
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
@@ -307,29 +310,29 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
307
310
|
]);
|
|
308
311
|
}
|
|
309
312
|
}
|
|
310
|
-
],
|
|
311
|
-
async function
|
|
313
|
+
], x = h();
|
|
314
|
+
async function D(e) {
|
|
312
315
|
await te.remove(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
) && await
|
|
316
|
+
l("connect.storeRewards.delete.confirm"),
|
|
317
|
+
l("connect.storeRewards.delete.title")
|
|
318
|
+
) && await o(
|
|
316
319
|
async () => {
|
|
317
320
|
await P.deleteReward(e._id), await C.readRewards();
|
|
318
321
|
},
|
|
319
322
|
{
|
|
320
|
-
message:
|
|
321
|
-
successMessage:
|
|
323
|
+
message: l("connect.storeRewards.delete.message"),
|
|
324
|
+
successMessage: l("connect.storeRewards.delete.success")
|
|
322
325
|
}
|
|
323
326
|
);
|
|
324
327
|
}
|
|
325
|
-
async function
|
|
326
|
-
var
|
|
328
|
+
async function T(e) {
|
|
329
|
+
var a;
|
|
327
330
|
e || (e = {
|
|
328
331
|
name: "",
|
|
329
332
|
option: {
|
|
330
333
|
type: "LOYALTY",
|
|
331
|
-
collectible:
|
|
332
|
-
collectibleType:
|
|
334
|
+
collectible: d.loyaltyRewards.items[0].value,
|
|
335
|
+
collectibleType: d.loyaltyRewards.items[0].raw.type,
|
|
333
336
|
validityOption: {
|
|
334
337
|
validForDay: 7
|
|
335
338
|
},
|
|
@@ -338,10 +341,10 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
338
341
|
amount: 1
|
|
339
342
|
}
|
|
340
343
|
}
|
|
341
|
-
}), (
|
|
344
|
+
}), (a = x.value) == null || a.showSheet(!0, ae(e));
|
|
342
345
|
}
|
|
343
|
-
async function
|
|
344
|
-
let
|
|
346
|
+
async function n(e) {
|
|
347
|
+
let a = !1;
|
|
345
348
|
e._id && e.option.type === "VOUCHER" && await new Promise((i) => {
|
|
346
349
|
R.open({
|
|
347
350
|
title: "Confirmation",
|
|
@@ -349,17 +352,17 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
349
352
|
primaryActions: { text: "Update all", close: !0 },
|
|
350
353
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
351
354
|
}).onPrimary(async () => {
|
|
352
|
-
|
|
355
|
+
a = !0, i();
|
|
353
356
|
}).onSecondary(async () => {
|
|
354
357
|
i();
|
|
355
358
|
});
|
|
356
|
-
}), await
|
|
359
|
+
}), await o(
|
|
357
360
|
async () => {
|
|
358
361
|
var i;
|
|
359
362
|
e.collectibleConfig = void 0, e._id ? await P.updateReward(e._id, {
|
|
360
363
|
...e,
|
|
361
|
-
updateCollection:
|
|
362
|
-
}) : await P.createReward(e), await C.readRewards(), (i =
|
|
364
|
+
updateCollection: a
|
|
365
|
+
}) : await P.createReward(e), await C.readRewards(), (i = x.value) == null || i.showSheet(!1);
|
|
363
366
|
},
|
|
364
367
|
{
|
|
365
368
|
message: "Updating reward",
|
|
@@ -369,68 +372,65 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
369
372
|
}
|
|
370
373
|
return q(async () => {
|
|
371
374
|
await v(async () => {
|
|
372
|
-
await
|
|
375
|
+
await d.readMembership(), await d.readRewards(), await C.readRewards();
|
|
373
376
|
});
|
|
374
|
-
}), (e,
|
|
375
|
-
const i =
|
|
377
|
+
}), (e, a) => {
|
|
378
|
+
const i = f("FmPageHead"), m = f("FmSearch"), g = f("FmTable"), r = f("FmButton"), E = f("FmCard");
|
|
376
379
|
return b(), M(Y, null, [
|
|
377
|
-
|
|
378
|
-
title: t(
|
|
380
|
+
c(i, {
|
|
381
|
+
title: t(l)("connect.reward.title"),
|
|
379
382
|
actions: [I],
|
|
380
383
|
"back-button": !0,
|
|
381
|
-
"onClick:action":
|
|
382
|
-
"onClick:back":
|
|
383
|
-
var
|
|
384
|
-
return (
|
|
384
|
+
"onClick:action": a[0] || (a[0] = () => T()),
|
|
385
|
+
"onClick:back": a[1] || (a[1] = () => {
|
|
386
|
+
var p;
|
|
387
|
+
return (p = t(y)) == null ? void 0 : p.back();
|
|
385
388
|
})
|
|
386
389
|
}, null, 8, ["title", "actions"]),
|
|
387
|
-
|
|
388
|
-
t(
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
w("div", ge, [
|
|
391
|
+
t(_) && t(_).length > 0 ? (b(), M(Y, { key: 0 }, [
|
|
392
|
+
w("div", be, [
|
|
393
|
+
Re,
|
|
394
|
+
c(m, {
|
|
392
395
|
modelValue: t(u).searchKey,
|
|
393
|
-
"onUpdate:modelValue":
|
|
396
|
+
"onUpdate:modelValue": a[2] || (a[2] = (p) => t(u).searchKey = p),
|
|
394
397
|
class: "",
|
|
395
398
|
placeholder: "search",
|
|
396
399
|
collapsible: ""
|
|
397
400
|
}, null, 8, ["modelValue"])
|
|
398
401
|
]),
|
|
399
|
-
|
|
400
|
-
"row-data": t(
|
|
402
|
+
c(g, {
|
|
403
|
+
"row-data": t(_),
|
|
401
404
|
"column-defs": S,
|
|
402
405
|
"search-value": t(u).searchKey,
|
|
403
406
|
"column-filter": t(u).columnFilters,
|
|
404
|
-
onRowClick:
|
|
405
|
-
"hide-footer": t(
|
|
407
|
+
onRowClick: a[3] || (a[3] = (p) => T(p.original)),
|
|
408
|
+
"hide-footer": t(_).length < 10
|
|
406
409
|
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
407
|
-
], 64)) : (b(),
|
|
410
|
+
], 64)) : (b(), U(E, {
|
|
408
411
|
key: 1,
|
|
409
412
|
variant: "outlined",
|
|
410
413
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
411
414
|
}, {
|
|
412
415
|
default: A(() => [
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
f("div", be, [
|
|
418
|
-
f("div", Re, B(t(n)("connect.storeRewards.empty.title")), 1),
|
|
419
|
-
f("div", Ce, B(t(n)("connect.storeRewards.empty.description")), 1)
|
|
416
|
+
Ce,
|
|
417
|
+
w("div", _e, [
|
|
418
|
+
w("div", Fe, B(t(l)("connect.storeRewards.empty.title")), 1),
|
|
419
|
+
w("div", Oe, B(t(l)("connect.storeRewards.empty.description")), 1)
|
|
420
420
|
]),
|
|
421
|
-
|
|
421
|
+
c(r, {
|
|
422
422
|
variant: "primary",
|
|
423
|
-
label: t(
|
|
424
|
-
onClick:
|
|
423
|
+
label: t(l)("connect.storeRewards.empty.action"),
|
|
424
|
+
onClick: a[4] || (a[4] = (p) => T()),
|
|
425
425
|
icon: "add"
|
|
426
426
|
}, null, 8, ["label"])
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
429
|
})),
|
|
430
|
-
|
|
430
|
+
c(ve, {
|
|
431
431
|
ref_key: "rewardSheetRef",
|
|
432
|
-
ref:
|
|
433
|
-
onUpdate:
|
|
432
|
+
ref: x,
|
|
433
|
+
onUpdate: a[5] || (a[5] = (p) => n(p))
|
|
434
434
|
}, null, 512)
|
|
435
435
|
])
|
|
436
436
|
], 64);
|
|
@@ -438,5 +438,5 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
export {
|
|
441
|
-
|
|
441
|
+
Je as default
|
|
442
442
|
};
|