@feedmepos/mf-connect 0.1.98-beta.39 → 0.1.98-beta.40
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/package.json +1 -1
- package/dist/App-DwjQisFZ.js +0 -4785
- package/dist/AuditLogs-DMGqmriL.js +0 -2014
- package/dist/Bin-4wvIqogM.js +0 -166
- package/dist/Broadcast-DPpuSZ8_.js +0 -269
- package/dist/CampaignAnalytic-CXFDo2X_.js +0 -1826
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SLoy1-Kd.js +0 -122
- package/dist/Card-C8SA6un0.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-BCpSiM_4.js +0 -541
- package/dist/Credit-C8RTBpP7.js +0 -286
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js +0 -3382
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CJTduNh3.js +0 -351
- package/dist/Experience-Bg3kFQQE.js +0 -285
- package/dist/FileSaver.min-DMUuMi9w.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
- package/dist/Game-D3DbkRUj.js +0 -356
- package/dist/GiftCardSetup-CxlMM4up.js +0 -542
- package/dist/Grab-DvEK8ixP.js +0 -301
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js +0 -145
- package/dist/Index-Do_9DXuY.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BKPGBYiU.js +0 -48
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js +0 -18737
- package/dist/LoyaltyDashboard-B4WqycGN.js +0 -1345
- package/dist/MainLayout-DdxLaufS.js +0 -143
- package/dist/Marketing-CcFEMwKB.js +0 -236
- package/dist/MarketingMaterialEdit-DoYFaMf7.js +0 -1036
- package/dist/Member-BussgBln.js +0 -281
- package/dist/MemberList-BXJxSsjo.js +0 -1603
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-O-XY5nz3.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js +0 -60957
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +0 -38
- package/dist/Mission-CPkM-8Ns.js +0 -360
- package/dist/Overview-BJjpYUJN.js +0 -1080
- package/dist/Overview-C5KF_Jxj.js +0 -1316
- package/dist/Point-FDFwR3Hk.js +0 -288
- package/dist/Promotion-qtucKxn0.js +0 -423
- package/dist/Queue-d91tocPX.js +0 -261
- package/dist/Record-CvkK2iLq.js +0 -342
- package/dist/Review-C_zLGtzU.js +0 -45
- package/dist/ReviewFacebookCallback-Bidg3P76.js +0 -238
- package/dist/ReviewGoogleCallback-DL0lxMBL.js +0 -213
- package/dist/Reward-BTsQaI-J.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BjxA4eMX.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D4NIDc-C.js +0 -1913
- package/dist/Segment-BgFyB3BK.js +0 -1017
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CkhjFNvZ.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-HYbRyACe.js +0 -189
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js +0 -226
- package/dist/Setting-BxHoCSxw.js +0 -2047
- package/dist/SettingAdvertisements-WfvuE4fA.js +0 -264
- package/dist/Settings-B42SAvEx.js +0 -179
- package/dist/Store-BnvWfCy-.js +0 -2413
- package/dist/StoreRewards-BRzAMqR-.js +0 -540
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3FJr1L5.js +0 -1075
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js +0 -7007
- package/dist/Tier-BrzLNat2.js +0 -972
- package/dist/Title-EnlaNXld.js +0 -569
- package/dist/Transaction-BiXNxUGX.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Db5_DKQ0.js +0 -130
- package/dist/Voucher-C2dyk-jj.js +0 -444
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DPE24a-J.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CI1HM9HA.js +0 -56
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-Bt8HrAEr.js +0 -60740
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-BwtQpfUr.js +0 -82
- package/dist/campaign-B6U9lwKi.js +0 -255
- package/dist/campaign-C6Cb9s3C.js +0 -100
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign.enum-Dx-Zo68Q.js +0 -26
- package/dist/campaign.fn-B0x2EGhw.js +0 -776
- package/dist/collectible.enum-Liy2wH3s.js +0 -19
- package/dist/collection.fn-DfoA9sJV.js +0 -26
- package/dist/duplicateCampaign-Cnq5N-V8.js +0 -51
- package/dist/effect-B2REbrv8.js +0 -89
- package/dist/email-addresses-BzmOsxLn.js +0 -705
- package/dist/export-jHpRhPQu.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/helper-DQAHX1kX.js +0 -86
- package/dist/index-4GG-yjdN.js +0 -2963
- package/dist/index-BWgMbKOB.js +0 -85
- package/dist/index-BccUpf0U.js +0 -3
- package/dist/index-BkgkJkVs.js +0 -8919
- package/dist/index-C0PKVTf9.js +0 -32
- package/dist/index-C8cXXcLk.js +0 -45
- package/dist/index-CTTGf4TM.js +0 -151
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DJN4auwx.js +0 -146
- package/dist/index-DMr9ohGV.js +0 -1139
- package/dist/index-DQTo_ytu.js +0 -31
- package/dist/index-DW7-0rf_.js +0 -53
- package/dist/index-Da7J83jM.js +0 -2706
- package/dist/index-Di1Z4vLS.js +0 -27550
- package/dist/index-FoKZGh7Z.js +0 -67
- package/dist/index-N25Px7RQ.js +0 -72
- package/dist/index-PgblELTo.js +0 -897
- package/dist/index-STBMTK1u.js +0 -28900
- package/dist/index-hP3Mgc0u.js +0 -55
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-DV56jzfJ.js +0 -3069
- package/dist/loading-D__sDcq1.js +0 -72
- package/dist/lodash-DgkDIHoV.js +0 -3678
- package/dist/membership-CBjt1MGx.js +0 -255
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-BFUbPKDM.js +0 -15
- package/dist/number-CJb8OUa3.js +0 -12
- package/dist/object-BYyQ0PZp.js +0 -18
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-BMUFNR9T.js +0 -145
- package/dist/plugins-D95ZeD-9.js +0 -1788
- package/dist/remy-Qz_pNsUS.js +0 -13
- package/dist/reward-CSfV_XFK.js +0 -36
- package/dist/rule-DIzVHy2z.js +0 -1969
- package/dist/rule-builder-DF7fCvec.js +0 -126
- package/dist/string-Gcy5IM_H.js +0 -32
- package/dist/style.css +0 -4
- package/dist/template-r3lAQP1B.js +0 -188
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-D40qRUoz.js +0 -20
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/transaction.fn-DV-cpfOj.js +0 -64
- package/dist/trigger-BEJaSv5R.js +0 -213
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/useMarketingMaterialActions-Bd5BDfE1.js +0 -96
- package/dist/usePagination-DLIo76-X.js +0 -220
- package/dist/user-DtEjuhyM.js +0 -55
- package/dist/vue-i18n-dQ1XCaUv.js +0 -2365
- package/dist/xlsx-BUMZsTov.js +0 -15491
- package/dist/zod-B_pVZhsV.js +0 -91
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Ne, computed as b, ref as i, onMounted as De, resolveComponent as _, openBlock as d, createElementBlock as m, createElementVNode as o, createVNode as a, toDisplayString as r, unref as e, withCtx as k, isRef as f, Fragment as L, renderList as I, normalizeClass as ue, createCommentVNode as h, withDirectives as Ve, withKeys as ke, vModelText as Ee, createBlock as Y, createTextVNode as me } from "vue";
|
|
2
|
-
import { u as Te } from "./loading-D__sDcq1.js";
|
|
3
|
-
import { u as Fe } from "./app-wDQR6dpb.js";
|
|
4
|
-
import { n as $, f as E } from "./plugins-D95ZeD-9.js";
|
|
5
|
-
import "./index-BccUpf0U.js";
|
|
6
|
-
import { g as Z } from "./index-DW7-0rf_.js";
|
|
7
|
-
import { p as j, q as Me, G as H, r as ee } from "./index-4GG-yjdN.js";
|
|
8
|
-
import { u as Ue } from "./vue-i18n-dQ1XCaUv.js";
|
|
9
|
-
import { useRouter as Pe, useRoute as Oe } from "vue-router";
|
|
10
|
-
import { R as Se } from "./app-Bt8HrAEr.js";
|
|
11
|
-
const Re = { class: "px-24 pb-40" }, Le = { class: "flex items-start gap-12 py-24" }, Ie = { class: "flex flex-col gap-4" }, $e = { class: "fm-typo-en-title-md-800 text-fm-color-typo-primary" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = { class: "flex flex-col gap-16 max-w-[860px]" }, Be = { class: "flex gap-12" }, Xe = { class: "flex flex-col gap-4" }, je = { class: "fm-typo-en-body-lg-600" }, ze = { class: "flex gap-12" }, Ke = { class: "flex flex-col gap-4" }, qe = { class: "fm-typo-en-body-lg-600" }, Je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qe = { class: "flex flex-wrap gap-12" }, We = ["src"], Ye = { class: "flex gap-12" }, Ze = { class: "flex flex-col gap-4" }, et = { class: "fm-typo-en-body-lg-600" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = { class: "flex flex-col gap-8" }, nt = ["onClick"], lt = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "w-[9px] h-[9px] rounded-full bg-fm-color-primary"
|
|
14
|
-
}, st = { class: "flex-1" }, at = { class: "block fm-typo-en-body-md-600" }, rt = { class: "block fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-2" }, it = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "grid sm:grid-cols-2 gap-16"
|
|
17
|
-
}, dt = { class: "flex items-center gap-16 p-16 rounded-md bg-fm-color-neutral-gray-100" }, ct = { class: "flex flex-col gap-2 flex-1 min-w-0" }, ut = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, mt = { class: "fm-typo-en-body-lg-600 truncate" }, ft = { class: "flex gap-12" }, pt = { class: "flex flex-col gap-4" }, vt = { class: "fm-typo-en-body-lg-600" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = { class: "flex flex-col gap-8" }, yt = { class: "fm-typo-en-body-md-600" }, bt = { class: "flex flex-wrap gap-8" }, _t = { class: "flex items-start gap-8" }, Ct = { class: "flex items-center rounded-md border-1 border-fm-color-neutral-gray-300 overflow-hidden" }, ht = ["placeholder"], At = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "flex flex-wrap gap-8"
|
|
20
|
-
}, wt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Nt = { class: "text-fm-color-primary" }, Dt = { class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300" }, Vt = { class: "flex-1" }, kt = { class: "fm-typo-en-body-md-600" }, Et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tt = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "flex gap-16"
|
|
23
|
-
}, Ft = {
|
|
24
|
-
key: 2,
|
|
25
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
26
|
-
}, Mt = { class: "flex gap-12" }, Ut = { class: "flex flex-col gap-4" }, Pt = { class: "fm-typo-en-body-lg-600" }, Ot = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, St = {
|
|
27
|
-
key: 0,
|
|
28
|
-
class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
|
|
29
|
-
}, Rt = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Lt = { class: "flex items-center gap-12" }, It = { class: "fm-typo-en-body-md-500" }, $t = { class: "flex flex-col gap-8" }, Ht = { class: "fm-typo-en-body-md-600" }, Gt = { class: "flex flex-wrap gap-8" }, Bt = { class: "flex gap-12" }, Xt = { class: "flex flex-col gap-4" }, jt = { class: "fm-typo-en-body-lg-600" }, zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kt = { class: "flex flex-wrap items-center gap-8" }, qt = {
|
|
30
|
-
key: 1,
|
|
31
|
-
class: "flex items-center gap-8 fm-typo-en-body-md-400"
|
|
32
|
-
}, Jt = ["href"], Qt = { class: "flex items-center justify-end gap-8 pt-8" }, io = /* @__PURE__ */ Ne({
|
|
33
|
-
__name: "GiftCardSetup",
|
|
34
|
-
setup(Wt) {
|
|
35
|
-
const { t: n } = Ue(), { global: fe, minor: z } = Te, pe = Pe(), ve = Oe(), T = b(() => ve.params.id || null), G = b(() => !!T.value), A = i(""), x = i([]);
|
|
36
|
-
let te = /* @__PURE__ */ new Set();
|
|
37
|
-
const oe = /* @__PURE__ */ new Set(), C = i("DEFAULT"), F = i(16), M = i(j().charset), U = i("GC"), P = i(""), ne = i(0), K = [10, 20, 30, 50, 100], c = i([]), w = i(""), y = i(!1), N = i(10), D = i(100), le = i(!1), O = i(!0), B = i(
|
|
38
|
-
"EMAIL_OR_PHONE"
|
|
39
|
-
), v = i("NONE"), S = i(""), V = i(""), se = b(
|
|
40
|
-
() => C.value === "ADVANCED" ? {
|
|
41
|
-
...j(),
|
|
42
|
-
length: Number(F.value),
|
|
43
|
-
charset: M.value,
|
|
44
|
-
prefix: U.value,
|
|
45
|
-
suffix: P.value
|
|
46
|
-
} : j()
|
|
47
|
-
), ge = b(() => (ne.value, Me(se.value))), ae = b(
|
|
48
|
-
() => c.value.length >= H
|
|
49
|
-
);
|
|
50
|
-
function re(s) {
|
|
51
|
-
if (c.value.includes(s)) {
|
|
52
|
-
c.value = c.value.filter((t) => t !== s);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (ae.value) {
|
|
56
|
-
$.error(
|
|
57
|
-
n("connect.store.giftCard.maxAmounts", {
|
|
58
|
-
max: H
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
c.value = [...c.value, s].sort((t, u) => t - u);
|
|
64
|
-
}
|
|
65
|
-
function ie() {
|
|
66
|
-
const s = Number(w.value);
|
|
67
|
-
if (!Number.isInteger(s) || s <= 0) {
|
|
68
|
-
$.error(n("connect.store.giftCard.invalidAmount"));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (s > ee) {
|
|
72
|
-
$.error(
|
|
73
|
-
n("connect.store.giftCard.amountTooLarge", { max: ee })
|
|
74
|
-
);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (c.value.includes(s)) {
|
|
78
|
-
w.value = "";
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (ae.value) {
|
|
82
|
-
$.error(
|
|
83
|
-
n("connect.store.giftCard.maxAmounts", {
|
|
84
|
-
max: H
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
c.value = [...c.value, s].sort((t, u) => t - u), w.value = "";
|
|
90
|
-
}
|
|
91
|
-
const q = b(() => c.value.length === 0 && !y.value ? n("connect.store.giftCard.errorNoAmount") : y.value && Number(N.value) > Number(D.value) ? n("connect.store.giftCard.errorRange") : null), xe = b(
|
|
92
|
-
() => A.value.trim() ? null : n("connect.store.giftCard.errorNoName")
|
|
93
|
-
), J = b(() => xe.value ?? q.value);
|
|
94
|
-
async function ye(s) {
|
|
95
|
-
await z(
|
|
96
|
-
async () => {
|
|
97
|
-
const t = await E.update(
|
|
98
|
-
E.bundleImagePath(void 0, s),
|
|
99
|
-
s
|
|
100
|
-
);
|
|
101
|
-
x.value = [...x.value, t];
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
message: n("connect.store.giftCard.uploading"),
|
|
105
|
-
successMessage: n("connect.store.giftCard.uploaded")
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
async function be(s) {
|
|
110
|
-
if (x.value = x.value.filter((t) => t !== s), te.has(s)) {
|
|
111
|
-
oe.add(s);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
try {
|
|
115
|
-
await E.delete(s);
|
|
116
|
-
} catch {
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
async function _e(s) {
|
|
120
|
-
await z(
|
|
121
|
-
async () => {
|
|
122
|
-
V.value = await E.update(
|
|
123
|
-
E.bundleImagePath(void 0, s),
|
|
124
|
-
s
|
|
125
|
-
), v.value = "DOCUMENT";
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
message: n("connect.store.giftCard.uploading"),
|
|
129
|
-
successMessage: n("connect.store.giftCard.uploaded")
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
function Ce() {
|
|
134
|
-
return {
|
|
135
|
-
name: A.value.trim(),
|
|
136
|
-
designs: x.value,
|
|
137
|
-
numberFormat: se.value,
|
|
138
|
-
denominations: c.value.map(Number),
|
|
139
|
-
anyAmount: y.value ? {
|
|
140
|
-
enabled: !0,
|
|
141
|
-
min: Number(N.value),
|
|
142
|
-
max: Number(D.value)
|
|
143
|
-
} : null,
|
|
144
|
-
recipientContactMethod: B.value,
|
|
145
|
-
allowPersonalMessage: O.value,
|
|
146
|
-
termsAndConditions: v.value === "TEXT" && S.value || null,
|
|
147
|
-
termsDocumentUrl: v.value === "DOCUMENT" && V.value || null
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
function he(s) {
|
|
151
|
-
var p, g, R;
|
|
152
|
-
A.value = s.name, x.value = [...s.designs ?? []], te = new Set(x.value), c.value = [...s.denominations ?? []], y.value = !!((p = s.anyAmount) != null && p.enabled), N.value = ((g = s.anyAmount) == null ? void 0 : g.min) ?? 10, D.value = ((R = s.anyAmount) == null ? void 0 : R.max) ?? 100, B.value = s.recipientContactMethod, O.value = s.allowPersonalMessage ?? !0;
|
|
153
|
-
const t = s.numberFormat, u = !t || t.prefix === "GC" && Number(t.length) === 16;
|
|
154
|
-
C.value = u ? "DEFAULT" : "ADVANCED", F.value = Number((t == null ? void 0 : t.length) ?? 16), M.value = (t == null ? void 0 : t.charset) ?? j().charset, U.value = (t == null ? void 0 : t.prefix) ?? "GC", P.value = (t == null ? void 0 : t.suffix) ?? "", s.termsDocumentUrl ? (v.value = "DOCUMENT", V.value = s.termsDocumentUrl) : s.termsAndConditions && (v.value = "TEXT", S.value = s.termsAndConditions);
|
|
155
|
-
}
|
|
156
|
-
function Q() {
|
|
157
|
-
pe.push({ name: Se["$connect-STORE"] });
|
|
158
|
-
}
|
|
159
|
-
async function Ae() {
|
|
160
|
-
if (J.value) {
|
|
161
|
-
$.error(J.value);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
await z(
|
|
165
|
-
async () => {
|
|
166
|
-
const s = Ce();
|
|
167
|
-
T.value ? await Z.updateProgram(T.value, s) : await Z.createProgram(s), await Promise.allSettled(
|
|
168
|
-
[...oe].map((t) => E.delete(t))
|
|
169
|
-
), Q();
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
message: G.value ? n("connect.store.giftCard.saving") : n("connect.store.giftCard.creating"),
|
|
173
|
-
successMessage: G.value ? n("connect.store.giftCard.saved") : n("connect.store.giftCard.created")
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
return De(async () => {
|
|
178
|
-
T.value && await fe(async () => {
|
|
179
|
-
he(await Z.readProgram(T.value));
|
|
180
|
-
});
|
|
181
|
-
}), (s, t) => {
|
|
182
|
-
const u = _("FmButton"), p = _("FmTextField"), g = _("FmCard"), R = _("FmDropField"), W = _("FmChip"), de = _("FmSwitch"), ce = _("FmIcon"), we = _("FmTextarea");
|
|
183
|
-
return d(), m("div", Re, [
|
|
184
|
-
o("div", Le, [
|
|
185
|
-
a(u, {
|
|
186
|
-
icon: "arrow_back",
|
|
187
|
-
variant: "tertiary",
|
|
188
|
-
onClick: Q
|
|
189
|
-
}),
|
|
190
|
-
o("div", Ie, [
|
|
191
|
-
o("h1", $e, r(e(G) ? e(n)("connect.store.giftCard.editTitle") : e(n)("connect.store.giftCard.createTitle")), 1),
|
|
192
|
-
o("p", He, r(e(n)("connect.store.giftCard.pageSubtitle")), 1)
|
|
193
|
-
])
|
|
194
|
-
]),
|
|
195
|
-
o("div", Ge, [
|
|
196
|
-
a(g, {
|
|
197
|
-
variant: "outlined",
|
|
198
|
-
class: "p-24 flex flex-col gap-16"
|
|
199
|
-
}, {
|
|
200
|
-
default: k(() => [
|
|
201
|
-
o("div", Be, [
|
|
202
|
-
t[15] || (t[15] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 1 ", -1)),
|
|
203
|
-
o("div", Xe, [
|
|
204
|
-
o("div", je, r(e(n)("connect.store.giftCard.name")), 1)
|
|
205
|
-
])
|
|
206
|
-
]),
|
|
207
|
-
a(p, {
|
|
208
|
-
modelValue: e(A),
|
|
209
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => f(A) ? A.value = l : null),
|
|
210
|
-
placeholder: e(n)("connect.store.giftCard.namePlaceholder")
|
|
211
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
212
|
-
]),
|
|
213
|
-
_: 1
|
|
214
|
-
}),
|
|
215
|
-
a(g, {
|
|
216
|
-
variant: "outlined",
|
|
217
|
-
class: "p-24 flex flex-col gap-16"
|
|
218
|
-
}, {
|
|
219
|
-
default: k(() => [
|
|
220
|
-
o("div", ze, [
|
|
221
|
-
t[16] || (t[16] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 2 ", -1)),
|
|
222
|
-
o("div", Ke, [
|
|
223
|
-
o("div", qe, r(e(n)("connect.store.giftCard.design")), 1),
|
|
224
|
-
o("div", Je, r(e(n)("connect.store.giftCard.designHint")), 1)
|
|
225
|
-
])
|
|
226
|
-
]),
|
|
227
|
-
o("div", Qe, [
|
|
228
|
-
(d(!0), m(L, null, I(e(x), (l) => (d(), m("div", {
|
|
229
|
-
key: l,
|
|
230
|
-
class: "relative w-[160px] aspect-video rounded-md overflow-hidden border-1 border-fm-color-neutral-gray-300"
|
|
231
|
-
}, [
|
|
232
|
-
o("img", {
|
|
233
|
-
src: l,
|
|
234
|
-
alt: "",
|
|
235
|
-
class: "w-full h-full object-cover"
|
|
236
|
-
}, null, 8, We),
|
|
237
|
-
a(u, {
|
|
238
|
-
icon: "close",
|
|
239
|
-
variant: "tertiary",
|
|
240
|
-
class: "absolute top-2 right-2",
|
|
241
|
-
onClick: (X) => be(l)
|
|
242
|
-
}, null, 8, ["onClick"])
|
|
243
|
-
]))), 128)),
|
|
244
|
-
a(R, {
|
|
245
|
-
accept: ".png, .jpg, .jpeg, .gif",
|
|
246
|
-
"max-file-size": 5e6,
|
|
247
|
-
onFileUpload: ye
|
|
248
|
-
})
|
|
249
|
-
])
|
|
250
|
-
]),
|
|
251
|
-
_: 1
|
|
252
|
-
}),
|
|
253
|
-
a(g, {
|
|
254
|
-
variant: "outlined",
|
|
255
|
-
class: "p-24 flex flex-col gap-16"
|
|
256
|
-
}, {
|
|
257
|
-
default: k(() => [
|
|
258
|
-
o("div", Ye, [
|
|
259
|
-
t[17] || (t[17] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 3 ", -1)),
|
|
260
|
-
o("div", Ze, [
|
|
261
|
-
o("div", et, r(e(n)("connect.store.giftCard.numberSettings")), 1),
|
|
262
|
-
o("div", tt, r(e(n)("connect.store.giftCard.numberSettingsHint")), 1)
|
|
263
|
-
])
|
|
264
|
-
]),
|
|
265
|
-
o("div", ot, [
|
|
266
|
-
(d(), m(L, null, I(["DEFAULT", "ADVANCED"], (l) => o("button", {
|
|
267
|
-
key: l,
|
|
268
|
-
type: "button",
|
|
269
|
-
class: ue([
|
|
270
|
-
"flex gap-12 items-start text-left p-16 rounded-md border-1 transition-colors",
|
|
271
|
-
e(C) === l ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
272
|
-
]),
|
|
273
|
-
onClick: (X) => C.value = l
|
|
274
|
-
}, [
|
|
275
|
-
o("span", {
|
|
276
|
-
class: ue([
|
|
277
|
-
"w-[18px] h-[18px] rounded-full border-1 flex-none mt-2 grid place-items-center",
|
|
278
|
-
e(C) === l ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
279
|
-
])
|
|
280
|
-
}, [
|
|
281
|
-
e(C) === l ? (d(), m("span", lt)) : h("", !0)
|
|
282
|
-
], 2),
|
|
283
|
-
o("span", st, [
|
|
284
|
-
o("span", at, r(l === "DEFAULT" ? e(n)("connect.store.giftCard.numberDefault") : e(n)("connect.store.giftCard.numberAdvanced")), 1),
|
|
285
|
-
o("span", rt, r(l === "DEFAULT" ? e(n)("connect.store.giftCard.numberDefaultHint") : e(n)("connect.store.giftCard.numberAdvancedHint")), 1)
|
|
286
|
-
])
|
|
287
|
-
], 10, nt)), 64))
|
|
288
|
-
]),
|
|
289
|
-
e(C) === "ADVANCED" ? (d(), m("div", it, [
|
|
290
|
-
a(p, {
|
|
291
|
-
modelValue: e(F),
|
|
292
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => f(F) ? F.value = l : null),
|
|
293
|
-
type: "number",
|
|
294
|
-
label: e(n)("connect.store.giftCard.length")
|
|
295
|
-
}, null, 8, ["modelValue", "label"]),
|
|
296
|
-
a(p, {
|
|
297
|
-
modelValue: e(M),
|
|
298
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) => f(M) ? M.value = l : null),
|
|
299
|
-
label: e(n)("connect.store.giftCard.charset")
|
|
300
|
-
}, null, 8, ["modelValue", "label"]),
|
|
301
|
-
a(p, {
|
|
302
|
-
modelValue: e(U),
|
|
303
|
-
"onUpdate:modelValue": t[3] || (t[3] = (l) => f(U) ? U.value = l : null),
|
|
304
|
-
label: e(n)("connect.store.giftCard.prefix")
|
|
305
|
-
}, null, 8, ["modelValue", "label"]),
|
|
306
|
-
a(p, {
|
|
307
|
-
modelValue: e(P),
|
|
308
|
-
"onUpdate:modelValue": t[4] || (t[4] = (l) => f(P) ? P.value = l : null),
|
|
309
|
-
label: e(n)("connect.store.giftCard.suffix")
|
|
310
|
-
}, null, 8, ["modelValue", "label"])
|
|
311
|
-
])) : h("", !0),
|
|
312
|
-
o("div", dt, [
|
|
313
|
-
o("div", ct, [
|
|
314
|
-
o("span", ut, r(e(n)("connect.store.giftCard.exampleNumber")), 1),
|
|
315
|
-
o("span", mt, r(e(ge)), 1)
|
|
316
|
-
]),
|
|
317
|
-
a(u, {
|
|
318
|
-
label: e(n)("connect.store.giftCard.regenerate"),
|
|
319
|
-
icon: "refresh",
|
|
320
|
-
variant: "secondary",
|
|
321
|
-
onClick: t[5] || (t[5] = (l) => ne.value++)
|
|
322
|
-
}, null, 8, ["label"])
|
|
323
|
-
])
|
|
324
|
-
]),
|
|
325
|
-
_: 1
|
|
326
|
-
}),
|
|
327
|
-
a(g, {
|
|
328
|
-
variant: "outlined",
|
|
329
|
-
class: "p-24 flex flex-col gap-16"
|
|
330
|
-
}, {
|
|
331
|
-
default: k(() => [
|
|
332
|
-
o("div", ft, [
|
|
333
|
-
t[18] || (t[18] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 4 ", -1)),
|
|
334
|
-
o("div", pt, [
|
|
335
|
-
o("div", vt, r(e(n)("connect.store.giftCard.amount")), 1),
|
|
336
|
-
o("div", gt, r(e(n)("connect.store.giftCard.amountHint", {
|
|
337
|
-
max: e(H)
|
|
338
|
-
})), 1)
|
|
339
|
-
])
|
|
340
|
-
]),
|
|
341
|
-
o("div", xt, [
|
|
342
|
-
o("div", yt, r(e(n)("connect.store.giftCard.popularAmounts")), 1),
|
|
343
|
-
o("div", bt, [
|
|
344
|
-
(d(), m(L, null, I(K, (l) => a(W, {
|
|
345
|
-
key: l,
|
|
346
|
-
label: `RM ${l}`,
|
|
347
|
-
selectable: "",
|
|
348
|
-
selected: e(c).includes(l),
|
|
349
|
-
onClick: (X) => re(l)
|
|
350
|
-
}, null, 8, ["label", "selected", "onClick"])), 64))
|
|
351
|
-
])
|
|
352
|
-
]),
|
|
353
|
-
o("div", _t, [
|
|
354
|
-
o("div", Ct, [
|
|
355
|
-
t[19] || (t[19] = o("span", { class: "px-12 py-8 bg-fm-color-neutral-gray-100 fm-typo-en-body-md-500 text-fm-color-typo-secondary" }, " RM ", -1)),
|
|
356
|
-
Ve(o("input", {
|
|
357
|
-
"onUpdate:modelValue": t[6] || (t[6] = (l) => f(w) ? w.value = l : null),
|
|
358
|
-
type: "number",
|
|
359
|
-
class: "px-12 py-8 outline-none fm-typo-en-body-md-400 w-[140px]",
|
|
360
|
-
placeholder: e(n)("connect.store.giftCard.custom"),
|
|
361
|
-
onKeyup: ke(ie, ["enter"])
|
|
362
|
-
}, null, 40, ht), [
|
|
363
|
-
[Ee, e(w)]
|
|
364
|
-
])
|
|
365
|
-
]),
|
|
366
|
-
a(u, {
|
|
367
|
-
label: e(n)("connect.store.giftCard.addAmount"),
|
|
368
|
-
variant: "secondary",
|
|
369
|
-
onClick: ie
|
|
370
|
-
}, null, 8, ["label"])
|
|
371
|
-
]),
|
|
372
|
-
e(c).some((l) => !K.includes(l)) ? (d(), m("div", At, [
|
|
373
|
-
(d(!0), m(L, null, I(e(c).filter(
|
|
374
|
-
(l) => !K.includes(l)
|
|
375
|
-
), (l) => (d(), Y(W, {
|
|
376
|
-
key: l,
|
|
377
|
-
label: `RM ${l}`,
|
|
378
|
-
removable: "",
|
|
379
|
-
onRemove: (X) => re(l)
|
|
380
|
-
}, null, 8, ["label", "onRemove"]))), 128))
|
|
381
|
-
])) : h("", !0),
|
|
382
|
-
o("div", wt, [
|
|
383
|
-
me(r(e(n)("connect.store.giftCard.selected")) + " ", 1),
|
|
384
|
-
o("span", Nt, r(e(c).length), 1),
|
|
385
|
-
me(" / " + r(e(H)), 1)
|
|
386
|
-
]),
|
|
387
|
-
o("div", Dt, [
|
|
388
|
-
a(de, {
|
|
389
|
-
modelValue: e(y),
|
|
390
|
-
"onUpdate:modelValue": t[7] || (t[7] = (l) => f(y) ? y.value = l : null)
|
|
391
|
-
}, null, 8, ["modelValue"]),
|
|
392
|
-
o("div", Vt, [
|
|
393
|
-
o("div", kt, r(e(n)("connect.store.giftCard.anyAmount")), 1),
|
|
394
|
-
o("div", Et, r(e(n)("connect.store.giftCard.anyAmountHint")), 1)
|
|
395
|
-
])
|
|
396
|
-
]),
|
|
397
|
-
e(y) ? (d(), m("div", Tt, [
|
|
398
|
-
a(p, {
|
|
399
|
-
modelValue: e(N),
|
|
400
|
-
"onUpdate:modelValue": t[8] || (t[8] = (l) => f(N) ? N.value = l : null),
|
|
401
|
-
type: "number",
|
|
402
|
-
label: e(n)("connect.store.giftCard.min"),
|
|
403
|
-
class: "flex-1"
|
|
404
|
-
}, null, 8, ["modelValue", "label"]),
|
|
405
|
-
a(p, {
|
|
406
|
-
modelValue: e(D),
|
|
407
|
-
"onUpdate:modelValue": t[9] || (t[9] = (l) => f(D) ? D.value = l : null),
|
|
408
|
-
type: "number",
|
|
409
|
-
label: e(n)("connect.store.giftCard.max"),
|
|
410
|
-
"helper-text": `Up to RM${e(ee)}`,
|
|
411
|
-
class: "flex-1"
|
|
412
|
-
}, null, 8, ["modelValue", "label", "helper-text"])
|
|
413
|
-
])) : h("", !0),
|
|
414
|
-
e(q) ? (d(), m("div", Ft, r(e(q)), 1)) : h("", !0)
|
|
415
|
-
]),
|
|
416
|
-
_: 1
|
|
417
|
-
}),
|
|
418
|
-
a(g, {
|
|
419
|
-
variant: "outlined",
|
|
420
|
-
class: "p-24 flex flex-col gap-16"
|
|
421
|
-
}, {
|
|
422
|
-
default: k(() => [
|
|
423
|
-
o("div", Mt, [
|
|
424
|
-
t[20] || (t[20] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 5 ", -1)),
|
|
425
|
-
o("div", Ut, [
|
|
426
|
-
o("div", Pt, r(e(n)("connect.store.giftCard.sending")), 1),
|
|
427
|
-
o("div", Ot, r(e(n)("connect.store.giftCard.sendingHint")), 1)
|
|
428
|
-
])
|
|
429
|
-
]),
|
|
430
|
-
e(le) ? h("", !0) : (d(), m("div", St, [
|
|
431
|
-
a(ce, {
|
|
432
|
-
name: "info",
|
|
433
|
-
class: "text-fm-color-system-info-400 flex-none"
|
|
434
|
-
}),
|
|
435
|
-
o("div", Rt, r(e(n)("connect.store.giftCard.broadcastNotice")), 1),
|
|
436
|
-
a(u, {
|
|
437
|
-
icon: "close",
|
|
438
|
-
variant: "tertiary",
|
|
439
|
-
onClick: t[10] || (t[10] = (l) => le.value = !0)
|
|
440
|
-
})
|
|
441
|
-
])),
|
|
442
|
-
o("div", Lt, [
|
|
443
|
-
a(de, {
|
|
444
|
-
modelValue: e(O),
|
|
445
|
-
"onUpdate:modelValue": t[11] || (t[11] = (l) => f(O) ? O.value = l : null)
|
|
446
|
-
}, null, 8, ["modelValue"]),
|
|
447
|
-
o("span", It, r(e(n)("connect.store.giftCard.personalMessage")), 1)
|
|
448
|
-
]),
|
|
449
|
-
o("div", $t, [
|
|
450
|
-
o("div", Ht, r(e(n)("connect.store.giftCard.contactMethod")), 1),
|
|
451
|
-
o("div", Gt, [
|
|
452
|
-
(d(!0), m(L, null, I([
|
|
453
|
-
{ value: "EMAIL", label: e(n)("connect.store.giftCard.email") },
|
|
454
|
-
{ value: "PHONE", label: e(n)("connect.store.giftCard.phone") },
|
|
455
|
-
{
|
|
456
|
-
value: "EMAIL_OR_PHONE",
|
|
457
|
-
label: e(n)("connect.store.giftCard.emailOrPhone")
|
|
458
|
-
}
|
|
459
|
-
], (l) => (d(), Y(W, {
|
|
460
|
-
key: l.value,
|
|
461
|
-
label: l.label,
|
|
462
|
-
selectable: "",
|
|
463
|
-
selected: e(B) === l.value,
|
|
464
|
-
onClick: (X) => B.value = l.value
|
|
465
|
-
}, null, 8, ["label", "selected", "onClick"]))), 128))
|
|
466
|
-
])
|
|
467
|
-
])
|
|
468
|
-
]),
|
|
469
|
-
_: 1
|
|
470
|
-
}),
|
|
471
|
-
a(g, {
|
|
472
|
-
variant: "outlined",
|
|
473
|
-
class: "p-24 flex flex-col gap-16"
|
|
474
|
-
}, {
|
|
475
|
-
default: k(() => [
|
|
476
|
-
o("div", Bt, [
|
|
477
|
-
t[21] || (t[21] = o("span", { class: "w-[18px] h-[18px] rounded-sm flex-none grid place-items-center bg-fm-color-primary-oats text-fm-color-primary text-[10px] leading-[14px] font-semibold" }, " 6 ", -1)),
|
|
478
|
-
o("div", Xt, [
|
|
479
|
-
o("div", jt, r(e(n)("connect.store.giftCard.terms")), 1),
|
|
480
|
-
o("div", zt, r(e(n)("connect.store.giftCard.termsHint")), 1)
|
|
481
|
-
])
|
|
482
|
-
]),
|
|
483
|
-
o("div", Kt, [
|
|
484
|
-
a(u, {
|
|
485
|
-
label: e(n)("connect.store.giftCard.enterText"),
|
|
486
|
-
icon: "edit",
|
|
487
|
-
variant: "secondary",
|
|
488
|
-
onClick: t[12] || (t[12] = (l) => v.value = "TEXT")
|
|
489
|
-
}, null, 8, ["label"]),
|
|
490
|
-
a(R, {
|
|
491
|
-
accept: ".pdf, .doc, .docx",
|
|
492
|
-
"max-file-size": 5e6,
|
|
493
|
-
onFileUpload: _e
|
|
494
|
-
})
|
|
495
|
-
]),
|
|
496
|
-
e(v) === "TEXT" ? (d(), Y(we, {
|
|
497
|
-
key: 0,
|
|
498
|
-
modelValue: e(S),
|
|
499
|
-
"onUpdate:modelValue": t[13] || (t[13] = (l) => f(S) ? S.value = l : null),
|
|
500
|
-
rows: 5,
|
|
501
|
-
placeholder: e(n)("connect.store.giftCard.termsPlaceholder")
|
|
502
|
-
}, null, 8, ["modelValue", "placeholder"])) : e(v) === "DOCUMENT" && e(V) ? (d(), m("div", qt, [
|
|
503
|
-
a(ce, {
|
|
504
|
-
name: "description",
|
|
505
|
-
class: "text-fm-color-typo-secondary"
|
|
506
|
-
}),
|
|
507
|
-
o("a", {
|
|
508
|
-
href: e(V),
|
|
509
|
-
target: "_blank",
|
|
510
|
-
rel: "noopener",
|
|
511
|
-
class: "text-fm-color-typo-info underline"
|
|
512
|
-
}, r(e(n)("connect.store.giftCard.viewDocument")), 9, Jt),
|
|
513
|
-
a(u, {
|
|
514
|
-
icon: "close",
|
|
515
|
-
variant: "tertiary",
|
|
516
|
-
onClick: t[14] || (t[14] = (l) => (V.value = "", v.value = "NONE"))
|
|
517
|
-
})
|
|
518
|
-
])) : h("", !0)
|
|
519
|
-
]),
|
|
520
|
-
_: 1
|
|
521
|
-
}),
|
|
522
|
-
o("div", Qt, [
|
|
523
|
-
a(u, {
|
|
524
|
-
label: e(n)("connect.common.cancel"),
|
|
525
|
-
variant: "tertiary",
|
|
526
|
-
onClick: Q
|
|
527
|
-
}, null, 8, ["label"]),
|
|
528
|
-
a(u, {
|
|
529
|
-
label: e(G) ? e(n)("connect.common.save") : e(n)("connect.store.giftCard.addGiftCard"),
|
|
530
|
-
loading: e(Fe)().isLoading,
|
|
531
|
-
disabled: !!e(J),
|
|
532
|
-
onClick: Ae
|
|
533
|
-
}, null, 8, ["label", "loading", "disabled"])
|
|
534
|
-
])
|
|
535
|
-
])
|
|
536
|
-
]);
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
export {
|
|
541
|
-
io as default
|
|
542
|
-
};
|