@feedmepos/mf-connect 0.1.98-beta.44 → 0.1.98-beta.45
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/{App-B1sVRUgU.js → App-BX2UE7QI.js} +40 -37
- package/dist/{AuditLogs-jIv5rADu.js → AuditLogs-Crhi9QVp.js} +10 -10
- package/dist/{Bin-BFb2FxJL.js → Bin-xPurvadn.js} +8 -8
- package/dist/{Broadcast-C-yR1YzE.js → Broadcast-CUYyGJY-.js} +11 -11
- package/dist/{CampaignAnalytic-D2Udb-1I.js → CampaignAnalytic-BfUdUO6Y.js} +6 -6
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-pp80jczz.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoXhFyzX.js} +7 -7
- package/dist/Card-CISdGnSl.js +1060 -0
- package/dist/{Collections-DoDZlLT5.js → Collections-N7QyYqC-.js} +8 -8
- package/dist/{Credit-D-ss0yae.js → Credit-DpgSuzmF.js} +12 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DbkQVmGE.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ber_smZ-.js} +32 -32
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-B8LawUFT.js → EffectSheet.vue_vue_type_style_index_0_lang-CoJVTW3E.js} +6 -6
- package/dist/{Experience-OMwgCv-k.js → Experience-DO7c3BW8.js} +12 -12
- package/dist/{FileSaver.min-Ck08usZi.js → FileSaver.min-Bjq1OZ_L.js} +1 -1
- package/dist/{Game-S5m1kti2.js → Game-BHtJD6LM.js} +13 -13
- package/dist/GiftCardSetup-Dg-kNVsD.js +633 -0
- package/dist/{Grab-CgVDlh8N.js → Grab-BOMxmAcZ.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B9JaZNoF.js → ImageInput.vue_vue_type_script_setup_true_lang-bEHeJol7.js} +1 -1
- package/dist/{Index-BZRQSQt3.js → Index-S2H2GVM8.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CZp2vyhp.js → LocationPicker.vue_vue_type_script_setup_true_lang-cgXkx7R_.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D9iMrk0m.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CQQJuVCF.js} +1 -1
- package/dist/{LoyaltyDashboard-CkJsz_FM.js → LoyaltyDashboard-CbwiKazp.js} +7 -7
- package/dist/{MainLayout-y2AvCI7H.js → MainLayout-CPS8NNOv.js} +3 -3
- package/dist/{Marketing-CdekCDN6.js → Marketing-zIfCm74o.js} +4 -4
- package/dist/{MarketingMaterialEdit-r3xPXa_W.js → MarketingMaterialEdit-D8Gj0bOa.js} +6 -6
- package/dist/{Member-D4O-38yG.js → Member-Wf4LUqGi.js} +12 -12
- package/dist/{MemberList-ABpFaISm.js → MemberList-CzLYfaf5.js} +26 -26
- package/dist/{MemberTransactions-DK-x6c7P.js → MemberTransactions-CeaEuCte.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DGPNmiR9.js → MessageInput.vue_vue_type_script_setup_true_lang-BDqO9M6_.js} +10 -10
- package/dist/{Mission-5RhDQ1MF.js → Mission-B4UV0vB0.js} +13 -13
- package/dist/{Overview-B52hUVqf.js → Overview-DIX5ot1i.js} +19 -19
- package/dist/{Overview-0ukOrJQs.js → Overview-Ddua14pp.js} +3 -3
- package/dist/{Point-TSd4Uvmd.js → Point-CIFEhEU0.js} +12 -12
- package/dist/{Promotion-BBpfsz8N.js → Promotion-DJRRCgsu.js} +13 -13
- package/dist/{Queue-BgnYKxGG.js → Queue-PxS_JYvd.js} +11 -11
- package/dist/{Record-CAtURV9U.js → Record-DbOoWfsG.js} +9 -9
- package/dist/{Review-CuSrZB-m.js → Review-BmUzIF6a.js} +2 -2
- package/dist/{ReviewFacebookCallback-DQTVwxJo.js → ReviewFacebookCallback-ABDk27W_.js} +5 -5
- package/dist/{ReviewGoogleCallback-Dn1bMM23.js → ReviewGoogleCallback-JiGhuvNs.js} +5 -5
- package/dist/{Reward-GArpJo5Q.js → Reward-C9JJh35t.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CuOxAvxV.js → RewardGroup.vue_vue_type_script_setup_true_lang-CoHS8BGv.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BZTg3pTi.js → RuleGroup.vue_vue_type_script_setup_true_lang-CH_hNR0X.js} +15 -15
- package/dist/{Segment-BNoD4VPH.js → Segment-BDF6homc.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-JrfOr5Px.js → SelectItems.vue_vue_type_script_setup_true_lang-CotltnlA.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BY8aFZsB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dm1Rm5yj.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-KVaH8rrU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bu3TFRAU.js} +4 -4
- package/dist/{Setting-CRYXwRFL.js → Setting-I1UmwNUM.js} +14 -14
- package/dist/{SettingAdvertisements-Cqp6piIi.js → SettingAdvertisements-BTSCR7Ca.js} +12 -12
- package/dist/{Settings-DNkUFLud.js → Settings-F8t7rjZL.js} +5 -5
- package/dist/Store-DH9SeWMt.js +2615 -0
- package/dist/{StoreRewards-DDlMWlTG.js → StoreRewards-EkAXltsf.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Zedck9Xi.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CXQyU9vZ.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C3RBFu6J.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-lnEbqNTU.js} +2 -2
- package/dist/{Tier-t2Ce3rxu.js → Tier-DuKpa1Ma.js} +25 -25
- package/dist/{Title-CdI511i0.js → Title-DlupKRiB.js} +22 -22
- package/dist/Transaction-jCh6b6-e.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DsZxEZw9.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DOvKneyI.js} +6 -6
- package/dist/{Voucher-D1QRj4Ps.js → Voucher-QOyU02Mg.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BVCNUWYO.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DH3SHPmi.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-W_7pFEAG.js → ZodTextField.vue_vue_type_script_setup_true_lang-DA98LDj7.js} +2 -2
- package/dist/{app-D4yjN_fQ.js → app-CNi4ejgf.js} +522 -357
- package/dist/app.js +1 -1
- package/dist/{business-Dq1_o57i.js → business-D_DxmzRi.js} +1 -1
- package/dist/{campaign-CNkbWJTf.js → campaign-CQOgVXhK.js} +2 -2
- package/dist/{campaign-B7NIPxHs.js → campaign-DgLtIuZl.js} +7 -7
- package/dist/{campaign.fn-qKzOoBBQ.js → campaign.fn-DaygvaVk.js} +83 -83
- package/dist/{collection.fn-BNRVdqye.js → collection.fn-C2FPUyIL.js} +2 -2
- package/dist/{duplicateCampaign-D29czqvn.js → duplicateCampaign-C1GvaB0K.js} +2 -2
- package/dist/{effect-B0ikJb6x.js → effect-CZW6UzGQ.js} +1 -1
- package/dist/{email-addresses-D0ZUpClg.js → email-addresses-C0rpNk69.js} +2 -2
- package/dist/{export-Cr4mjkQZ.js → export-BljjhGlT.js} +3 -3
- package/dist/{helper-ClPuPdgQ.js → helper-BNVm1awI.js} +1 -1
- package/dist/{index-BcHiQWdr.js → index--l25G-H2.js} +2 -2
- package/dist/{index-B2hKSeR1.js → index-20y5ETqa.js} +1 -1
- package/dist/{index-By93YZmr.js → index-B3VxErFJ.js} +11 -6
- package/dist/{index-DfMsF_gT.js → index-BLcxRCDQ.js} +4 -4
- package/dist/{index-Dpk1tAhn.js → index-BTMG_CZc.js} +2 -2
- package/dist/{index-DpSlYwDW.js → index-Bl2Io2q7.js} +2 -2
- package/dist/{index-CuHNDW6e.js → index-C41OQn3b.js} +1 -1
- package/dist/{index-CnckzYTa.js → index-CP9JOHTI.js} +1 -1
- package/dist/{index-CFk1uqb8.js → index-CTDIDrHN.js} +1 -1
- package/dist/{index-DL7_OC7M.js → index-ChPTYhTe.js} +1 -1
- package/dist/{index-GjzeMN4u.js → index-ClMqJYPu.js} +480 -480
- package/dist/{index-Dyc5Dpgs.js → index-CuSyySq9.js} +1 -1
- package/dist/{index-DiqNx6FV.js → index-IL6JQ0Uk.js} +1 -1
- package/dist/{index-C8cXXcLk.js → index-JlyOHqyG.js} +19 -13
- package/dist/{index-BOfM9FNu.js → index-_RZ5EbvD.js} +7 -7
- package/dist/{index-BrP_OwGm.js → index-aRRiC6b9.js} +7 -7
- package/dist/{index-nuptxtNP.js → index-jN921Dx6.js} +3 -3
- package/dist/{index-CuPBtB3W.js → index-sBl1JAut.js} +1 -1
- package/dist/{index.esm2017-D3pI9NTE.js → index.esm2017-D2J5P0Jx.js} +1 -1
- package/dist/{loading-DLrpThuY.js → loading-fSLeqKr_.js} +1 -1
- package/dist/{lodash-BIVtqtkS.js → lodash-CanxPAR4.js} +1 -1
- package/dist/{membership-PNg3pIQf.js → membership-BrdyfO2y.js} +2 -2
- package/dist/{money-Ck2sBYbh.js → money-W_YTwyxP.js} +1 -1
- package/dist/{number-dfEMJDkz.js → number-j1vVuQpy.js} +1 -1
- package/dist/{objectid-Bz-UKgI1.js → objectid-DhwxE2Ct.js} +9 -9
- package/dist/{plugins-D4_SIsjZ.js → plugins-2XgEvjxm.js} +3 -3
- package/dist/{reward-UzeAq0jY.js → reward-Bk3FZbGj.js} +1 -1
- package/dist/{rule-6OCvKihv.js → rule-M9AijHS0.js} +3 -3
- package/dist/{rule-builder-VwyrN58i.js → rule-builder-C4yj8l-c.js} +1 -1
- package/dist/{template-DtwmJYOa.js → template-BguoWqRC.js} +6 -6
- package/dist/{timezone-CHqOZvJX.js → timezone-DdkTIxnK.js} +1 -1
- package/dist/{transaction.fn-rUQ2fYVQ.js → transaction.fn-BpfxFtTu.js} +1 -1
- package/dist/{trigger-BT3dj5qY.js → trigger-C7MXRREg.js} +5 -5
- package/dist/{useMarketingMaterialActions-Dgq_G1qO.js → useMarketingMaterialActions-CgJpHDNv.js} +3 -3
- package/dist/{usePagination-a1XSuIrr.js → usePagination-Csc19YZ0.js} +1 -1
- package/dist/{user-CFls8m-e.js → user-DCwNBNr2.js} +1 -1
- package/dist/{vue-i18n-CzEcAXx-.js → vue-i18n-BIpsBqfV.js} +397 -397
- package/dist/{xlsx-DKPe4AfX.js → xlsx-Esg-74Jx.js} +1 -1
- package/dist/{zod-D2Q81R3d.js → zod-D9ri6sIU.js} +1 -1
- package/package.json +1 -1
- package/dist/Card-CzzNo7nk.js +0 -996
- package/dist/GiftCardSetup-CR8NpUJv.js +0 -542
- package/dist/Store-Dnt8VDQA.js +0 -2413
- package/dist/Transaction-C2BHJU7_.js +0 -39
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
import { defineComponent as Ge, computed as g, ref as c, onMounted as Xe, resolveComponent as w, openBlock as d, createElementBlock as m, createElementVNode as o, createVNode as r, toDisplayString as s, unref as e, withCtx as T, isRef as y, Fragment as G, renderList as X, normalizeClass as Ce, createCommentVNode as _, withDirectives as Be, withKeys as je, vModelText as ze, createBlock as ne, createTextVNode as le } from "vue";
|
|
2
|
+
import { u as qe } from "./loading-fSLeqKr_.js";
|
|
3
|
+
import { u as Ke } from "./app-wDQR6dpb.js";
|
|
4
|
+
import { n as E, f as S } from "./plugins-2XgEvjxm.js";
|
|
5
|
+
import "./index-C41OQn3b.js";
|
|
6
|
+
import { g as ae } from "./index-ChPTYhTe.js";
|
|
7
|
+
import { c as We } from "./index-B3VxErFJ.js";
|
|
8
|
+
import { S as Ze } from "./index-BTMG_CZc.js";
|
|
9
|
+
import { p as W, q as Qe, G as B, r as se } from "./index-ClMqJYPu.js";
|
|
10
|
+
import { u as Ye } from "./vue-i18n-BIpsBqfV.js";
|
|
11
|
+
import { useRouter as Je, useRoute as et } from "vue-router";
|
|
12
|
+
import { R as tt } from "./app-CNi4ejgf.js";
|
|
13
|
+
var ot = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
14
|
+
const nt = { class: "px-24 pb-40" }, lt = { class: "flex items-start gap-12 py-24" }, at = { class: "flex flex-col gap-4" }, st = { class: "fm-typo-en-title-md-800 text-fm-color-typo-primary" }, rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = { class: "flex flex-col gap-16 max-w-[860px]" }, it = { class: "flex gap-12" }, dt = { class: "flex flex-col gap-4" }, ut = { class: "fm-typo-en-body-lg-600" }, mt = { class: "flex gap-12" }, ft = { class: "flex flex-col gap-4" }, pt = { class: "fm-typo-en-body-lg-600" }, vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex flex-wrap gap-12" }, yt = ["src"], xt = { class: "absolute top-4 right-4 flex gap-4" }, bt = { class: "flex gap-12" }, _t = { class: "flex flex-col gap-4" }, Ct = { class: "fm-typo-en-body-lg-600" }, ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, At = { class: "flex flex-col gap-8" }, wt = ["onClick"], kt = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "w-[9px] h-[9px] rounded-full bg-fm-color-primary"
|
|
17
|
+
}, Dt = { class: "flex-1" }, Ut = { class: "block fm-typo-en-body-md-600" }, Nt = { class: "block fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-2" }, Ft = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "grid sm:grid-cols-2 gap-16"
|
|
20
|
+
}, Vt = { class: "flex items-center gap-16 p-16 rounded-md bg-fm-color-neutral-gray-100" }, Tt = { class: "flex flex-col gap-2 flex-1 min-w-0" }, Et = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, St = { class: "fm-typo-en-body-lg-600 truncate" }, Mt = { class: "flex gap-12" }, Pt = { class: "flex flex-col gap-4" }, It = { class: "fm-typo-en-body-lg-600" }, Lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $t = { class: "flex flex-col gap-8" }, Rt = { class: "fm-typo-en-body-md-600" }, Ht = { class: "flex flex-wrap gap-8" }, Ot = { class: "flex items-start gap-8" }, Gt = { class: "flex items-center rounded-md border-1 border-fm-color-neutral-gray-300 overflow-hidden" }, Xt = ["placeholder"], Bt = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "flex flex-wrap gap-8"
|
|
23
|
+
}, jt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zt = { class: "text-fm-color-primary" }, qt = { class: "flex items-center gap-12 p-16 rounded-md border-1 border-fm-color-neutral-gray-300" }, Kt = { class: "flex-1" }, Wt = { class: "fm-typo-en-body-md-600" }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "flex gap-16"
|
|
26
|
+
}, Yt = {
|
|
27
|
+
key: 2,
|
|
28
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
29
|
+
}, Jt = { class: "flex gap-12" }, eo = { class: "flex flex-col gap-4" }, to = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "flex items-start gap-12 p-16 rounded-md bg-fm-color-system-info-100"
|
|
32
|
+
}, lo = { class: "flex-1 fm-typo-en-body-md-400 text-fm-color-typo-primary" }, ao = { class: "flex items-center gap-12" }, so = { class: "fm-typo-en-body-md-500" }, ro = { class: "flex flex-col gap-8" }, co = { class: "fm-typo-en-body-md-600" }, io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, uo = { class: "flex flex-wrap gap-8" }, mo = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
35
|
+
}, fo = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
38
|
+
}, po = { class: "flex gap-12" }, vo = { class: "flex flex-col gap-4" }, go = { class: "fm-typo-en-body-lg-600" }, yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xo = { class: "flex flex-wrap items-center gap-8" }, bo = {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: "flex items-center gap-8 fm-typo-en-body-md-400"
|
|
41
|
+
}, _o = ["href"], Co = { class: "flex items-center justify-end gap-8 pt-8" }, he = 5e6, Po = /* @__PURE__ */ Ge({
|
|
42
|
+
__name: "GiftCardSetup",
|
|
43
|
+
setup(ho) {
|
|
44
|
+
const { t: n } = Ye(), { global: Ae, minor: j } = qe, we = Je(), ke = et(), M = g(() => ke.params.id || null), z = g(() => !!M.value), D = c(""), v = c([]), re = c(null), Z = c(null);
|
|
45
|
+
let ce = /* @__PURE__ */ new Set();
|
|
46
|
+
const ie = /* @__PURE__ */ new Set(), De = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/gif"]), k = c("DEFAULT"), P = c(16), I = c(W().charset), L = c("GC"), $ = c(""), de = c(0), Q = [10, 20, 30, 50, 100], u = c([]), U = c(""), C = c(!1), N = c(10), F = c(100), ue = c(!1), R = c(!0), x = c(["SMS"]), Y = c({
|
|
47
|
+
SMS: !0,
|
|
48
|
+
WHATSAPP: !1,
|
|
49
|
+
EMAIL: !1
|
|
50
|
+
}), me = g(
|
|
51
|
+
() => ["SMS", "WHATSAPP", "EMAIL"].map((l) => ({
|
|
52
|
+
value: l,
|
|
53
|
+
label: n(`connect.store.giftCard.channel${l}`),
|
|
54
|
+
available: Y.value[l]
|
|
55
|
+
}))
|
|
56
|
+
), fe = g(
|
|
57
|
+
() => me.value.filter((l) => !l.available).map((l) => l.label)
|
|
58
|
+
), Ue = `${ot.licensePortalUrl}settings?businessId=${Ze.businessId}`;
|
|
59
|
+
function Ne(l) {
|
|
60
|
+
!Y.value[l] && !x.value.includes(l) || (x.value = x.value.includes(l) ? x.value.filter((t) => t !== l) : [...x.value, l]);
|
|
61
|
+
}
|
|
62
|
+
async function Fe() {
|
|
63
|
+
try {
|
|
64
|
+
Y.value = await We.readBroadcastChannels();
|
|
65
|
+
} catch (l) {
|
|
66
|
+
console.error("Failed to load notification channel status", l);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const b = c("NONE"), H = c(""), V = c(""), pe = g(
|
|
70
|
+
() => k.value === "ADVANCED" ? {
|
|
71
|
+
...W(),
|
|
72
|
+
length: Number(P.value),
|
|
73
|
+
charset: I.value,
|
|
74
|
+
prefix: L.value,
|
|
75
|
+
suffix: $.value
|
|
76
|
+
} : W()
|
|
77
|
+
), Ve = g(() => (de.value, Qe(pe.value))), ve = g(
|
|
78
|
+
() => u.value.length >= B
|
|
79
|
+
);
|
|
80
|
+
function ge(l) {
|
|
81
|
+
if (u.value.includes(l)) {
|
|
82
|
+
u.value = u.value.filter((t) => t !== l);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (ve.value) {
|
|
86
|
+
E.error(
|
|
87
|
+
n("connect.store.giftCard.maxAmounts", {
|
|
88
|
+
max: B
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
u.value = [...u.value, l].sort((t, i) => t - i);
|
|
94
|
+
}
|
|
95
|
+
function ye() {
|
|
96
|
+
const l = Number(U.value);
|
|
97
|
+
if (!Number.isInteger(l) || l <= 0) {
|
|
98
|
+
E.error(n("connect.store.giftCard.invalidAmount"));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (l > se) {
|
|
102
|
+
E.error(
|
|
103
|
+
n("connect.store.giftCard.amountTooLarge", { max: se })
|
|
104
|
+
);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (u.value.includes(l)) {
|
|
108
|
+
U.value = "";
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (ve.value) {
|
|
112
|
+
E.error(
|
|
113
|
+
n("connect.store.giftCard.maxAmounts", {
|
|
114
|
+
max: B
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
u.value = [...u.value, l].sort((t, i) => t - i), U.value = "";
|
|
120
|
+
}
|
|
121
|
+
const J = g(() => u.value.length === 0 && !C.value ? n("connect.store.giftCard.errorNoAmount") : C.value && Number(N.value) > Number(F.value) ? n("connect.store.giftCard.errorRange") : null), Te = g(
|
|
122
|
+
() => D.value.trim() ? null : n("connect.store.giftCard.errorNoName")
|
|
123
|
+
), ee = g(
|
|
124
|
+
() => x.value.length ? null : n("connect.store.giftCard.errorNoChannel")
|
|
125
|
+
), te = g(
|
|
126
|
+
() => Te.value ?? J.value ?? ee.value
|
|
127
|
+
);
|
|
128
|
+
async function Ee(l) {
|
|
129
|
+
be(l) && await j(
|
|
130
|
+
async () => {
|
|
131
|
+
const t = await xe(l);
|
|
132
|
+
v.value = [...v.value, t];
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
message: n("connect.store.giftCard.uploading"),
|
|
136
|
+
successMessage: n("connect.store.giftCard.uploaded")
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
function xe(l) {
|
|
141
|
+
return S.update(
|
|
142
|
+
S.bundleImagePath(void 0, l),
|
|
143
|
+
l
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function be(l) {
|
|
147
|
+
const t = De.has(l.type) && l.size <= he;
|
|
148
|
+
return t || E.error(n("connect.store.giftCard.invalidDesignFile")), t;
|
|
149
|
+
}
|
|
150
|
+
function Se(l) {
|
|
151
|
+
var t;
|
|
152
|
+
Z.value = l, (t = re.value) == null || t.click();
|
|
153
|
+
}
|
|
154
|
+
async function Me(l) {
|
|
155
|
+
var p;
|
|
156
|
+
const t = l.target, i = Z.value, f = (p = t.files) == null ? void 0 : p[0];
|
|
157
|
+
t.value = "", Z.value = null, !(i === null || !f || !be(f)) && await j(
|
|
158
|
+
async () => {
|
|
159
|
+
const h = v.value[i];
|
|
160
|
+
if (!h) return;
|
|
161
|
+
const A = await xe(f);
|
|
162
|
+
v.value = v.value.map(
|
|
163
|
+
(q, K) => K === i ? A : q
|
|
164
|
+
), await _e(h);
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
message: n("connect.store.giftCard.uploading"),
|
|
168
|
+
successMessage: n("connect.store.giftCard.uploaded")
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
async function Pe(l) {
|
|
173
|
+
v.value = v.value.filter((t) => t !== l), await _e(l);
|
|
174
|
+
}
|
|
175
|
+
async function _e(l) {
|
|
176
|
+
if (ce.has(l)) {
|
|
177
|
+
ie.add(l);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
await S.delete(l);
|
|
182
|
+
} catch {
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async function Ie(l) {
|
|
186
|
+
await j(
|
|
187
|
+
async () => {
|
|
188
|
+
V.value = await S.update(
|
|
189
|
+
S.bundleImagePath(void 0, l),
|
|
190
|
+
l
|
|
191
|
+
), b.value = "DOCUMENT";
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
message: n("connect.store.giftCard.uploading"),
|
|
195
|
+
successMessage: n("connect.store.giftCard.uploaded")
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
function Le() {
|
|
200
|
+
return {
|
|
201
|
+
name: D.value.trim(),
|
|
202
|
+
designs: v.value,
|
|
203
|
+
numberFormat: pe.value,
|
|
204
|
+
denominations: u.value.map(Number),
|
|
205
|
+
anyAmount: C.value ? {
|
|
206
|
+
enabled: !0,
|
|
207
|
+
min: Number(N.value),
|
|
208
|
+
max: Number(F.value)
|
|
209
|
+
} : null,
|
|
210
|
+
channels: x.value,
|
|
211
|
+
allowPersonalMessage: R.value,
|
|
212
|
+
termsAndConditions: b.value === "TEXT" && H.value || null,
|
|
213
|
+
termsDocumentUrl: b.value === "DOCUMENT" && V.value || null
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function $e(l) {
|
|
217
|
+
var f, p, h, A;
|
|
218
|
+
D.value = l.name, v.value = [...l.designs ?? []], ce = new Set(v.value), u.value = [...l.denominations ?? []], C.value = !!((f = l.anyAmount) != null && f.enabled), N.value = ((p = l.anyAmount) == null ? void 0 : p.min) ?? 10, F.value = ((h = l.anyAmount) == null ? void 0 : h.max) ?? 100, x.value = (A = l.channels) != null && A.length ? [...l.channels] : ["SMS"], R.value = l.allowPersonalMessage ?? !0;
|
|
219
|
+
const t = l.numberFormat, i = !t || t.prefix === "GC" && Number(t.length) === 16;
|
|
220
|
+
k.value = i ? "DEFAULT" : "ADVANCED", P.value = Number((t == null ? void 0 : t.length) ?? 16), I.value = (t == null ? void 0 : t.charset) ?? W().charset, L.value = (t == null ? void 0 : t.prefix) ?? "GC", $.value = (t == null ? void 0 : t.suffix) ?? "", l.termsDocumentUrl ? (b.value = "DOCUMENT", V.value = l.termsDocumentUrl) : l.termsAndConditions && (b.value = "TEXT", H.value = l.termsAndConditions);
|
|
221
|
+
}
|
|
222
|
+
function oe() {
|
|
223
|
+
we.push({ name: tt["$connect-STORE"] });
|
|
224
|
+
}
|
|
225
|
+
async function Re() {
|
|
226
|
+
if (te.value) {
|
|
227
|
+
E.error(te.value);
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
await j(
|
|
231
|
+
async () => {
|
|
232
|
+
const l = Le();
|
|
233
|
+
M.value ? await ae.updateProgram(M.value, l) : await ae.createProgram(l), await Promise.allSettled(
|
|
234
|
+
[...ie].map((t) => S.delete(t))
|
|
235
|
+
), oe();
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
message: z.value ? n("connect.store.giftCard.saving") : n("connect.store.giftCard.creating"),
|
|
239
|
+
successMessage: z.value ? n("connect.store.giftCard.saved") : n("connect.store.giftCard.created")
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
return Xe(async () => {
|
|
244
|
+
await Ae(async () => {
|
|
245
|
+
await Fe(), M.value && $e(await ae.readProgram(M.value));
|
|
246
|
+
});
|
|
247
|
+
}), (l, t) => {
|
|
248
|
+
const i = w("FmButton"), f = w("FmTextField"), p = w("FmCard"), h = w("FmDropField"), A = w("FmChip"), q = w("FmSwitch"), K = w("FmIcon"), He = w("FmTextarea");
|
|
249
|
+
return d(), m("div", nt, [
|
|
250
|
+
o("div", lt, [
|
|
251
|
+
r(i, {
|
|
252
|
+
icon: "arrow_back",
|
|
253
|
+
variant: "tertiary",
|
|
254
|
+
onClick: oe
|
|
255
|
+
}),
|
|
256
|
+
o("div", at, [
|
|
257
|
+
o("h1", st, s(e(z) ? e(n)("connect.store.giftCard.editTitle") : e(n)("connect.store.giftCard.createTitle")), 1),
|
|
258
|
+
o("p", rt, s(e(n)("connect.store.giftCard.pageSubtitle")), 1)
|
|
259
|
+
])
|
|
260
|
+
]),
|
|
261
|
+
o("div", ct, [
|
|
262
|
+
r(p, {
|
|
263
|
+
variant: "outlined",
|
|
264
|
+
class: "p-24 flex flex-col gap-16"
|
|
265
|
+
}, {
|
|
266
|
+
default: T(() => [
|
|
267
|
+
o("div", it, [
|
|
268
|
+
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 fm-typo-en-body-sm-600" }, " 1 ", -1)),
|
|
269
|
+
o("div", dt, [
|
|
270
|
+
o("div", ut, s(e(n)("connect.store.giftCard.name")), 1)
|
|
271
|
+
])
|
|
272
|
+
]),
|
|
273
|
+
r(f, {
|
|
274
|
+
modelValue: e(D),
|
|
275
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => y(D) ? D.value = a : null),
|
|
276
|
+
placeholder: e(n)("connect.store.giftCard.namePlaceholder")
|
|
277
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
}),
|
|
281
|
+
r(p, {
|
|
282
|
+
variant: "outlined",
|
|
283
|
+
class: "p-24 flex flex-col gap-16"
|
|
284
|
+
}, {
|
|
285
|
+
default: T(() => [
|
|
286
|
+
o("div", mt, [
|
|
287
|
+
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 fm-typo-en-body-sm-600" }, " 2 ", -1)),
|
|
288
|
+
o("div", ft, [
|
|
289
|
+
o("div", pt, s(e(n)("connect.store.giftCard.design")), 1),
|
|
290
|
+
o("div", vt, s(e(n)("connect.store.giftCard.designHint")), 1)
|
|
291
|
+
])
|
|
292
|
+
]),
|
|
293
|
+
o("div", gt, [
|
|
294
|
+
o("input", {
|
|
295
|
+
ref_key: "designInput",
|
|
296
|
+
ref: re,
|
|
297
|
+
type: "file",
|
|
298
|
+
accept: ".png,.jpg,.jpeg,.gif",
|
|
299
|
+
class: "hidden",
|
|
300
|
+
onChange: Me
|
|
301
|
+
}, null, 544),
|
|
302
|
+
(d(!0), m(G, null, X(e(v), (a, O) => (d(), m("div", {
|
|
303
|
+
key: a,
|
|
304
|
+
class: "relative w-[160px] aspect-video rounded-md overflow-hidden border-1 border-fm-color-neutral-gray-300"
|
|
305
|
+
}, [
|
|
306
|
+
o("img", {
|
|
307
|
+
src: a,
|
|
308
|
+
alt: "",
|
|
309
|
+
class: "w-full h-full object-cover"
|
|
310
|
+
}, null, 8, yt),
|
|
311
|
+
o("div", xt, [
|
|
312
|
+
r(i, {
|
|
313
|
+
icon: "edit",
|
|
314
|
+
variant: "secondary",
|
|
315
|
+
"aria-label": e(n)("connect.common.edit"),
|
|
316
|
+
title: e(n)("connect.common.edit"),
|
|
317
|
+
onClick: (Oe) => Se(O)
|
|
318
|
+
}, null, 8, ["aria-label", "title", "onClick"]),
|
|
319
|
+
r(i, {
|
|
320
|
+
icon: "delete",
|
|
321
|
+
variant: "destructive",
|
|
322
|
+
"aria-label": e(n)("connect.common.remove"),
|
|
323
|
+
title: e(n)("connect.common.remove"),
|
|
324
|
+
onClick: (Oe) => Pe(a)
|
|
325
|
+
}, null, 8, ["aria-label", "title", "onClick"])
|
|
326
|
+
])
|
|
327
|
+
]))), 128)),
|
|
328
|
+
r(h, {
|
|
329
|
+
accept: ".png, .jpg, .jpeg, .gif",
|
|
330
|
+
"max-file-size": he,
|
|
331
|
+
onFileUpload: Ee
|
|
332
|
+
})
|
|
333
|
+
])
|
|
334
|
+
]),
|
|
335
|
+
_: 1
|
|
336
|
+
}),
|
|
337
|
+
r(p, {
|
|
338
|
+
variant: "outlined",
|
|
339
|
+
class: "p-24 flex flex-col gap-16"
|
|
340
|
+
}, {
|
|
341
|
+
default: T(() => [
|
|
342
|
+
o("div", bt, [
|
|
343
|
+
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 fm-typo-en-body-sm-600" }, " 3 ", -1)),
|
|
344
|
+
o("div", _t, [
|
|
345
|
+
o("div", Ct, s(e(n)("connect.store.giftCard.numberSettings")), 1),
|
|
346
|
+
o("div", ht, s(e(n)("connect.store.giftCard.numberSettingsHint")), 1)
|
|
347
|
+
])
|
|
348
|
+
]),
|
|
349
|
+
o("div", At, [
|
|
350
|
+
(d(), m(G, null, X(["DEFAULT", "ADVANCED"], (a) => o("button", {
|
|
351
|
+
key: a,
|
|
352
|
+
type: "button",
|
|
353
|
+
class: Ce([
|
|
354
|
+
"flex gap-12 items-start text-left p-16 rounded-md border-1 transition-colors",
|
|
355
|
+
e(k) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
356
|
+
]),
|
|
357
|
+
onClick: (O) => k.value = a
|
|
358
|
+
}, [
|
|
359
|
+
o("span", {
|
|
360
|
+
class: Ce([
|
|
361
|
+
"w-[18px] h-[18px] rounded-full border-1 flex-none mt-2 grid place-items-center",
|
|
362
|
+
e(k) === a ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
363
|
+
])
|
|
364
|
+
}, [
|
|
365
|
+
e(k) === a ? (d(), m("span", kt)) : _("", !0)
|
|
366
|
+
], 2),
|
|
367
|
+
o("span", Dt, [
|
|
368
|
+
o("span", Ut, s(a === "DEFAULT" ? e(n)("connect.store.giftCard.numberDefault") : e(n)("connect.store.giftCard.numberAdvanced")), 1),
|
|
369
|
+
o("span", Nt, s(a === "DEFAULT" ? e(n)("connect.store.giftCard.numberDefaultHint") : e(n)("connect.store.giftCard.numberAdvancedHint")), 1)
|
|
370
|
+
])
|
|
371
|
+
], 10, wt)), 64))
|
|
372
|
+
]),
|
|
373
|
+
e(k) === "ADVANCED" ? (d(), m("div", Ft, [
|
|
374
|
+
r(f, {
|
|
375
|
+
modelValue: e(P),
|
|
376
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => y(P) ? P.value = a : null),
|
|
377
|
+
type: "number",
|
|
378
|
+
label: e(n)("connect.store.giftCard.length")
|
|
379
|
+
}, null, 8, ["modelValue", "label"]),
|
|
380
|
+
r(f, {
|
|
381
|
+
modelValue: e(I),
|
|
382
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => y(I) ? I.value = a : null),
|
|
383
|
+
label: e(n)("connect.store.giftCard.charset")
|
|
384
|
+
}, null, 8, ["modelValue", "label"]),
|
|
385
|
+
r(f, {
|
|
386
|
+
modelValue: e(L),
|
|
387
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => y(L) ? L.value = a : null),
|
|
388
|
+
label: e(n)("connect.store.giftCard.prefix")
|
|
389
|
+
}, null, 8, ["modelValue", "label"]),
|
|
390
|
+
r(f, {
|
|
391
|
+
modelValue: e($),
|
|
392
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => y($) ? $.value = a : null),
|
|
393
|
+
label: e(n)("connect.store.giftCard.suffix")
|
|
394
|
+
}, null, 8, ["modelValue", "label"])
|
|
395
|
+
])) : _("", !0),
|
|
396
|
+
o("div", Vt, [
|
|
397
|
+
o("div", Tt, [
|
|
398
|
+
o("span", Et, s(e(n)("connect.store.giftCard.exampleNumber")), 1),
|
|
399
|
+
o("span", St, s(e(Ve)), 1)
|
|
400
|
+
]),
|
|
401
|
+
r(i, {
|
|
402
|
+
label: e(n)("connect.store.giftCard.regenerate"),
|
|
403
|
+
icon: "refresh",
|
|
404
|
+
variant: "secondary",
|
|
405
|
+
onClick: t[5] || (t[5] = (a) => de.value++)
|
|
406
|
+
}, null, 8, ["label"])
|
|
407
|
+
])
|
|
408
|
+
]),
|
|
409
|
+
_: 1
|
|
410
|
+
}),
|
|
411
|
+
r(p, {
|
|
412
|
+
variant: "outlined",
|
|
413
|
+
class: "p-24 flex flex-col gap-16"
|
|
414
|
+
}, {
|
|
415
|
+
default: T(() => [
|
|
416
|
+
o("div", Mt, [
|
|
417
|
+
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 fm-typo-en-body-sm-600" }, " 4 ", -1)),
|
|
418
|
+
o("div", Pt, [
|
|
419
|
+
o("div", It, s(e(n)("connect.store.giftCard.amount")), 1),
|
|
420
|
+
o("div", Lt, s(e(n)("connect.store.giftCard.amountHint", {
|
|
421
|
+
max: e(B)
|
|
422
|
+
})), 1)
|
|
423
|
+
])
|
|
424
|
+
]),
|
|
425
|
+
o("div", $t, [
|
|
426
|
+
o("div", Rt, s(e(n)("connect.store.giftCard.popularAmounts")), 1),
|
|
427
|
+
o("div", Ht, [
|
|
428
|
+
(d(), m(G, null, X(Q, (a) => r(A, {
|
|
429
|
+
key: a,
|
|
430
|
+
label: `RM ${a}`,
|
|
431
|
+
selectable: "",
|
|
432
|
+
selected: e(u).includes(a),
|
|
433
|
+
onClick: (O) => ge(a)
|
|
434
|
+
}, null, 8, ["label", "selected", "onClick"])), 64))
|
|
435
|
+
])
|
|
436
|
+
]),
|
|
437
|
+
o("div", Ot, [
|
|
438
|
+
o("div", Gt, [
|
|
439
|
+
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)),
|
|
440
|
+
Be(o("input", {
|
|
441
|
+
"onUpdate:modelValue": t[6] || (t[6] = (a) => y(U) ? U.value = a : null),
|
|
442
|
+
type: "number",
|
|
443
|
+
class: "px-12 py-8 outline-none fm-typo-en-body-md-400 w-[140px]",
|
|
444
|
+
placeholder: e(n)("connect.store.giftCard.custom"),
|
|
445
|
+
onKeyup: je(ye, ["enter"])
|
|
446
|
+
}, null, 40, Xt), [
|
|
447
|
+
[ze, e(U)]
|
|
448
|
+
])
|
|
449
|
+
]),
|
|
450
|
+
r(i, {
|
|
451
|
+
label: e(n)("connect.store.giftCard.addAmount"),
|
|
452
|
+
variant: "secondary",
|
|
453
|
+
onClick: ye
|
|
454
|
+
}, null, 8, ["label"])
|
|
455
|
+
]),
|
|
456
|
+
e(u).some((a) => !Q.includes(a)) ? (d(), m("div", Bt, [
|
|
457
|
+
(d(!0), m(G, null, X(e(u).filter(
|
|
458
|
+
(a) => !Q.includes(a)
|
|
459
|
+
), (a) => (d(), ne(A, {
|
|
460
|
+
key: a,
|
|
461
|
+
label: `RM ${a}`,
|
|
462
|
+
removable: "",
|
|
463
|
+
onChipClosed: (O) => ge(a)
|
|
464
|
+
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
465
|
+
])) : _("", !0),
|
|
466
|
+
o("div", jt, [
|
|
467
|
+
le(s(e(n)("connect.store.giftCard.selected")) + " ", 1),
|
|
468
|
+
o("span", zt, s(e(u).length), 1),
|
|
469
|
+
le(" / " + s(e(B)), 1)
|
|
470
|
+
]),
|
|
471
|
+
o("div", qt, [
|
|
472
|
+
r(q, {
|
|
473
|
+
modelValue: e(C),
|
|
474
|
+
"onUpdate:modelValue": t[7] || (t[7] = (a) => y(C) ? C.value = a : null)
|
|
475
|
+
}, null, 8, ["modelValue"]),
|
|
476
|
+
o("div", Kt, [
|
|
477
|
+
o("div", Wt, s(e(n)("connect.store.giftCard.anyAmount")), 1),
|
|
478
|
+
o("div", Zt, s(e(n)("connect.store.giftCard.anyAmountHint")), 1)
|
|
479
|
+
])
|
|
480
|
+
]),
|
|
481
|
+
e(C) ? (d(), m("div", Qt, [
|
|
482
|
+
r(f, {
|
|
483
|
+
modelValue: e(N),
|
|
484
|
+
"onUpdate:modelValue": t[8] || (t[8] = (a) => y(N) ? N.value = a : null),
|
|
485
|
+
type: "number",
|
|
486
|
+
label: e(n)("connect.store.giftCard.min"),
|
|
487
|
+
class: "flex-1"
|
|
488
|
+
}, null, 8, ["modelValue", "label"]),
|
|
489
|
+
r(f, {
|
|
490
|
+
modelValue: e(F),
|
|
491
|
+
"onUpdate:modelValue": t[9] || (t[9] = (a) => y(F) ? F.value = a : null),
|
|
492
|
+
type: "number",
|
|
493
|
+
label: e(n)("connect.store.giftCard.max"),
|
|
494
|
+
"helper-text": `Up to RM${e(se)}`,
|
|
495
|
+
class: "flex-1"
|
|
496
|
+
}, null, 8, ["modelValue", "label", "helper-text"])
|
|
497
|
+
])) : _("", !0),
|
|
498
|
+
e(J) ? (d(), m("div", Yt, s(e(J)), 1)) : _("", !0)
|
|
499
|
+
]),
|
|
500
|
+
_: 1
|
|
501
|
+
}),
|
|
502
|
+
r(p, {
|
|
503
|
+
variant: "outlined",
|
|
504
|
+
class: "p-24 flex flex-col gap-16"
|
|
505
|
+
}, {
|
|
506
|
+
default: T(() => [
|
|
507
|
+
o("div", Jt, [
|
|
508
|
+
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 fm-typo-en-body-sm-600" }, " 5 ", -1)),
|
|
509
|
+
o("div", eo, [
|
|
510
|
+
o("div", to, s(e(n)("connect.store.giftCard.sending")), 1),
|
|
511
|
+
o("div", oo, s(e(n)("connect.store.giftCard.sendingHint")), 1)
|
|
512
|
+
])
|
|
513
|
+
]),
|
|
514
|
+
e(ue) ? _("", !0) : (d(), m("div", no, [
|
|
515
|
+
r(K, {
|
|
516
|
+
name: "info",
|
|
517
|
+
class: "text-fm-color-system-info-400 flex-none"
|
|
518
|
+
}),
|
|
519
|
+
o("div", lo, s(e(n)("connect.store.giftCard.broadcastNotice")), 1),
|
|
520
|
+
r(i, {
|
|
521
|
+
icon: "close",
|
|
522
|
+
variant: "tertiary",
|
|
523
|
+
onClick: t[10] || (t[10] = (a) => ue.value = !0)
|
|
524
|
+
})
|
|
525
|
+
])),
|
|
526
|
+
o("div", ao, [
|
|
527
|
+
r(q, {
|
|
528
|
+
modelValue: e(R),
|
|
529
|
+
"onUpdate:modelValue": t[11] || (t[11] = (a) => y(R) ? R.value = a : null)
|
|
530
|
+
}, null, 8, ["modelValue"]),
|
|
531
|
+
o("span", so, s(e(n)("connect.store.giftCard.personalMessage")), 1)
|
|
532
|
+
]),
|
|
533
|
+
o("div", ro, [
|
|
534
|
+
o("div", co, s(e(n)("connect.store.giftCard.channels")), 1),
|
|
535
|
+
o("div", io, s(e(n)("connect.store.giftCard.channelsHint")), 1),
|
|
536
|
+
o("div", uo, [
|
|
537
|
+
(d(!0), m(G, null, X(e(me), (a) => (d(), ne(A, {
|
|
538
|
+
key: a.value,
|
|
539
|
+
label: a.label,
|
|
540
|
+
selectable: "",
|
|
541
|
+
selected: e(x).includes(a.value),
|
|
542
|
+
disabled: !a.available && !e(x).includes(a.value),
|
|
543
|
+
onClick: (O) => Ne(a.value)
|
|
544
|
+
}, null, 8, ["label", "selected", "disabled", "onClick"]))), 128))
|
|
545
|
+
]),
|
|
546
|
+
e(fe).length ? (d(), m("div", mo, [
|
|
547
|
+
le(s(e(n)("connect.store.giftCard.channelUnavailable", {
|
|
548
|
+
channels: e(fe).join(", ")
|
|
549
|
+
})) + " ", 1),
|
|
550
|
+
o("a", {
|
|
551
|
+
href: Ue,
|
|
552
|
+
target: "_blank",
|
|
553
|
+
rel: "noopener",
|
|
554
|
+
class: "underline fm-typo-en-body-md-600 text-fm-color-primary"
|
|
555
|
+
}, s(e(n)("connect.store.giftCard.channelConfigure")), 1)
|
|
556
|
+
])) : _("", !0),
|
|
557
|
+
e(ee) ? (d(), m("div", fo, s(e(ee)), 1)) : _("", !0)
|
|
558
|
+
])
|
|
559
|
+
]),
|
|
560
|
+
_: 1
|
|
561
|
+
}),
|
|
562
|
+
r(p, {
|
|
563
|
+
variant: "outlined",
|
|
564
|
+
class: "p-24 flex flex-col gap-16"
|
|
565
|
+
}, {
|
|
566
|
+
default: T(() => [
|
|
567
|
+
o("div", po, [
|
|
568
|
+
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 fm-typo-en-body-sm-600" }, " 6 ", -1)),
|
|
569
|
+
o("div", vo, [
|
|
570
|
+
o("div", go, s(e(n)("connect.store.giftCard.terms")), 1),
|
|
571
|
+
o("div", yo, s(e(n)("connect.store.giftCard.termsHint")), 1)
|
|
572
|
+
])
|
|
573
|
+
]),
|
|
574
|
+
o("div", xo, [
|
|
575
|
+
r(i, {
|
|
576
|
+
label: e(n)("connect.store.giftCard.enterText"),
|
|
577
|
+
icon: "edit",
|
|
578
|
+
variant: "secondary",
|
|
579
|
+
onClick: t[12] || (t[12] = (a) => b.value = "TEXT")
|
|
580
|
+
}, null, 8, ["label"]),
|
|
581
|
+
r(h, {
|
|
582
|
+
accept: ".pdf, .doc, .docx",
|
|
583
|
+
"max-file-size": 5e6,
|
|
584
|
+
onFileUpload: Ie
|
|
585
|
+
})
|
|
586
|
+
]),
|
|
587
|
+
e(b) === "TEXT" ? (d(), ne(He, {
|
|
588
|
+
key: 0,
|
|
589
|
+
modelValue: e(H),
|
|
590
|
+
"onUpdate:modelValue": t[13] || (t[13] = (a) => y(H) ? H.value = a : null),
|
|
591
|
+
rows: 5,
|
|
592
|
+
placeholder: e(n)("connect.store.giftCard.termsPlaceholder")
|
|
593
|
+
}, null, 8, ["modelValue", "placeholder"])) : e(b) === "DOCUMENT" && e(V) ? (d(), m("div", bo, [
|
|
594
|
+
r(K, {
|
|
595
|
+
name: "description",
|
|
596
|
+
class: "text-fm-color-typo-secondary"
|
|
597
|
+
}),
|
|
598
|
+
o("a", {
|
|
599
|
+
href: e(V),
|
|
600
|
+
target: "_blank",
|
|
601
|
+
rel: "noopener",
|
|
602
|
+
class: "text-fm-color-typo-info underline"
|
|
603
|
+
}, s(e(n)("connect.store.giftCard.viewDocument")), 9, _o),
|
|
604
|
+
r(i, {
|
|
605
|
+
icon: "close",
|
|
606
|
+
variant: "tertiary",
|
|
607
|
+
onClick: t[14] || (t[14] = (a) => (V.value = "", b.value = "NONE"))
|
|
608
|
+
})
|
|
609
|
+
])) : _("", !0)
|
|
610
|
+
]),
|
|
611
|
+
_: 1
|
|
612
|
+
}),
|
|
613
|
+
o("div", Co, [
|
|
614
|
+
r(i, {
|
|
615
|
+
label: e(n)("connect.common.cancel"),
|
|
616
|
+
variant: "tertiary",
|
|
617
|
+
onClick: oe
|
|
618
|
+
}, null, 8, ["label"]),
|
|
619
|
+
r(i, {
|
|
620
|
+
label: e(z) ? e(n)("connect.common.save") : e(n)("connect.store.giftCard.addGiftCard"),
|
|
621
|
+
loading: e(Ke)().isLoading,
|
|
622
|
+
disabled: !!e(te),
|
|
623
|
+
onClick: Re
|
|
624
|
+
}, null, 8, ["label", "loading", "disabled"])
|
|
625
|
+
])
|
|
626
|
+
])
|
|
627
|
+
]);
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
export {
|
|
632
|
+
Po as default
|
|
633
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
|
|
2
2
|
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as ee, components as te } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as P } from "./plugins-
|
|
5
|
-
import { u as oe } from "./loading-
|
|
6
|
-
import { u as ne } from "./business-
|
|
7
|
-
import { u as ae } from "./campaign-
|
|
8
|
-
import { u as re } from "./vue-i18n-
|
|
4
|
+
import { p as P } from "./plugins-2XgEvjxm.js";
|
|
5
|
+
import { u as oe } from "./loading-fSLeqKr_.js";
|
|
6
|
+
import { u as ne } from "./business-D_DxmzRi.js";
|
|
7
|
+
import { u as ae } from "./campaign-CQOgVXhK.js";
|
|
8
|
+
import { u as re } from "./vue-i18n-BIpsBqfV.js";
|
|
9
9
|
import { h as d } from "./moment-D7p2TMB-.js";
|
|
10
|
-
import { a as se, b as V } from "./campaign-
|
|
11
|
-
import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as le } from "./template-
|
|
10
|
+
import { a as se, b as V } from "./campaign-DgLtIuZl.js";
|
|
11
|
+
import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ber_smZ-.js";
|
|
12
|
+
import { u as le } from "./template-BguoWqRC.js";
|
|
13
13
|
import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
14
|
-
import { c as C } from "./index-
|
|
14
|
+
import { c as C } from "./index-B3VxErFJ.js";
|
|
15
15
|
const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
|
|
16
16
|
__name: "Grab",
|
|
17
17
|
setup(_e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as l, createElementBlock as o, createElementVNode as r, defineComponent as $, ref as b, onMounted as I, resolveComponent as f, renderSlot as x, toDisplayString as s, createCommentVNode as h, normalizeStyle as V, unref as i, Fragment as w, createVNode as F, withCtx as g, createTextVNode as p, normalizeClass as z, createBlock as k } from "vue";
|
|
2
|
-
import { u as R } from "./vue-i18n-
|
|
2
|
+
import { u as R } from "./vue-i18n-BIpsBqfV.js";
|
|
3
3
|
import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const N = {}, D = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
|
|
5
5
|
function L(e, d) {
|