@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.81
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-CJap-Cat.js → Analytic-FMehGs58.js} +31 -32
- package/dist/{App-CLTtX1QT.js → App-7cwNu3e0.js} +617 -607
- package/dist/AuditLogs-CpmLBHAR.js +1991 -0
- package/dist/{Bin-C2xMLxoE.js → Bin-D21tScmC.js} +10 -10
- package/dist/Broadcast-DrX9zS2Z.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvN7Q36X.js} +6 -6
- package/dist/{Card-BPrCNLQy.js → Card-Nk0KHSjb.js} +145 -140
- package/dist/Collections-BAnIaZRj.js +540 -0
- package/dist/Credit-BhU_Vd3l.js +260 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DUrvbUE4.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CqBGsZmi.js +351 -0
- package/dist/Experience-B7Fl1uzk.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-DaCnYliS.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/Game-BdkSBpyV.js +330 -0
- package/dist/Grab-y_ISAZvb.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-WEsv0wME.js} +49 -48
- package/dist/{Index-DMdNgISh.js → Index-DZp0xkxW.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-DXMshwQu.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-24MFkuKg.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-B8VvzvAT.js} +1 -1
- package/dist/Marketing-BXfk7ZLc.js +166 -0
- package/dist/MarketingMaterialEdit-CoDx_QvV.js +1065 -0
- package/dist/{Member-CnSXGQi_.js → Member-DOP3Z4-m.js} +38 -37
- package/dist/{MemberList-DcpEKV1D.js → MemberList-BcMezuLM.js} +486 -491
- package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-BEG9Cfgw.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-R6ImfcMO.js} +13443 -10607
- package/dist/Mission-C4eWldYu.js +334 -0
- package/dist/{Overview-elpi-jpI.js → Overview-0V1dmEPw.js} +24 -25
- package/dist/Point-s9t7_Iee.js +262 -0
- package/dist/Promotion-VZCoFHHx.js +396 -0
- package/dist/{Queue-GvBhNEFe.js → Queue-DdoHcsXv.js} +23 -24
- package/dist/{Record-CbSxgo8i.js → Record-B73AsvsB.js} +10 -10
- package/dist/Review-eEJG7-gc.js +621 -0
- package/dist/ReviewFacebookCallback-Cq1fGEP3.js +243 -0
- package/dist/ReviewGoogleCallback-C7BBKqnK.js +213 -0
- package/dist/{Reward-QCGlrq89.js → Reward-DKFT9MmI.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-vbTI-3-L.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dc4daP4P.js +1912 -0
- package/dist/{Segment-5PndnEUa.js → Segment-RAMBNzZd.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-pQmd43cO.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-PwedwyBw.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-rN37l0uX.js +226 -0
- package/dist/Setting--t7CPcWL.js +2039 -0
- package/dist/SettingAdvertisements-BzhckLOK.js +264 -0
- package/dist/Store-Dnax6l9z.js +1996 -0
- package/dist/StoreRewards-BIdtA-W4.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B__Nqwzg.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-on00idd9.js +7007 -0
- package/dist/{Tier-BKKxG29r.js → Tier-Ch63LeNc.js} +561 -480
- package/dist/{Title-CReZgw8V.js → Title-wOMe2o3w.js} +151 -149
- package/dist/{Transaction-HWCmSVaJ.js → Transaction-CpkfV_sQ.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-MPlAwheJ.js} +7 -7
- package/dist/Voucher-DlOZmlyt.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DBAk4tDY.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-BhCfP2wn.js} +2 -2
- package/dist/app-nACimuOe.js +59309 -0
- package/dist/app.js +1 -1
- package/dist/{business-Bc-EMd2p.js → business-BpM7Eni_.js} +11 -8
- package/dist/campaign-BaSTB-19.js +219 -0
- package/dist/campaign-CN7MibEN.js +253 -0
- package/dist/campaign.enum-CW4ESvMk.js +26 -0
- package/dist/campaign.fn-DPMaaXjP.js +776 -0
- package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-_Bg6BIol.js} +1 -1
- package/dist/{collection.fn-AjDNdFe1.js → collection.fn-D86VQVrc.js} +2 -2
- package/dist/dto-By8psmkB.js +222 -0
- package/dist/duplicateCampaign-AVfDsabR.js +51 -0
- package/dist/effect-CCB9eCEr.js +89 -0
- package/dist/{email-addresses-B0SzUCQM.js → email-addresses-CyMOiGPR.js} +2 -2
- package/dist/{export-Bgz6WcNZ.js → export-DPUTGKPb.js} +4 -4
- package/dist/{helper-B1vFwohM.js → helper-CYKFnu8y.js} +22 -7
- package/dist/index-43V5T9JA.js +28899 -0
- package/dist/{index-DVQnrex_.js → index-9FXa-6Mk.js} +3 -3
- package/dist/{index-26SopNpv.js → index-B9vArh0F.js} +1 -1
- package/dist/index-BF2vcn02.js +3431 -0
- package/dist/{index-BIRmS75g.js → index-BPBdEGEz.js} +1 -1
- package/dist/index-BTaTuuEo.js +48 -0
- package/dist/{index-Cm2sBagk.js → index-Beq-ShJI.js} +1 -1
- package/dist/{index-CSQY21Zb.js → index-BxGFddJP.js} +3 -3
- package/dist/index-C0veCCui.js +85 -0
- package/dist/index-C0yZzlB3.js +8912 -0
- package/dist/index-CJy_KEtq.js +30289 -0
- package/dist/{index-DwT9RLst.js → index-CZRA2IY5.js} +23 -12
- package/dist/{index-DT2viYsL.js → index-Cpff1wjo.js} +617 -191
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-DHrbC5Ry.js} +185 -185
- package/dist/{loading-C6Ouh0mG.js → loading-BSMi2eIc.js} +1 -1
- package/dist/{lodash-B5I3zXaY.js → lodash-DZxxJH2N.js} +1 -1
- package/dist/{membership-DU0BwIj8.js → membership-CWkspNDR.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-Bg7GuE5s.js → money-CSBC-3Ol.js} +1 -1
- package/dist/{number-Ddmqo5D_.js → number-CeqAGZy9.js} +1 -1
- package/dist/objectid-C_sYOjBD.js +145 -0
- package/dist/{campaign-BeF8kTyg.js → plugins-B37e5K6S.js} +784 -777
- package/dist/remy-DM_pSPd3.js +46 -0
- package/dist/{reward-CN4gvn4c.js → reward-BHf9o7F7.js} +1 -1
- package/dist/{rule-CpiqqR0c.js → rule-CAOC63go.js} +505 -487
- package/dist/rule-builder-BTxbYw5Z.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-DHmXFTjv.js +188 -0
- package/dist/timezone-C9EUfUmm.js +1156 -0
- package/dist/trigger--TbXeeFT.js +213 -0
- package/dist/usePagination-Lr6F7nYH.js +220 -0
- package/dist/user-DOc3B6F_.js +55 -0
- package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DQbt3scE.js} +409 -409
- package/dist/{xlsx-qJHsnW7k.js → xlsx-QxmpwFgC.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-OfQMlh-A.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DW4rwNOn.js +0 -1887
- package/dist/Broadcast-Dhc0j16O.js +0 -227
- package/dist/Collections-CsUJEmqz.js +0 -465
- package/dist/Credit-Mqa-0XJd.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
- package/dist/Experience-BD5C3old.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-D4xsi8Ym.js +0 -278
- package/dist/Marketing-axcQYl8k.js +0 -20073
- package/dist/Mission-BHZiL-GH.js +0 -296
- package/dist/Point-gKvdggAl.js +0 -226
- package/dist/Promotion-7x2F_sFX.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
- package/dist/Setting-Cab47wfH.js +0 -1936
- package/dist/Store-BFL3T9B5.js +0 -1842
- package/dist/StoreRewards-C43dCJtM.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
- package/dist/Voucher-BhUAcPZg.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BGaUIdCr.js +0 -7086
- package/dist/app-DccKBdW_.js +0 -33357
- package/dist/campaign-DbJZEU7P.js +0 -96
- package/dist/campaign.enum-PBKYGUQY.js +0 -20
- package/dist/campaign.fn-Cq-4LfQj.js +0 -758
- package/dist/dto-8NvMMYAb.js +0 -214
- package/dist/effect-DZhcEQ5g.js +0 -78
- package/dist/index-CQQedv0M.js +0 -32260
- package/dist/index-CTgQRqQR.js +0 -30038
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DGaywhpY.js +0 -76
- package/dist/index-DOfLDlI8.js +0 -8861
- package/dist/index-DVpAocyR.js +0 -3120
- package/dist/index-DlJGd8RC.js +0 -121
- package/dist/index-Dm65CTdy.js +0 -38
- package/dist/objectid-MCaJXAgq.js +0 -145
- package/dist/plugins-C-CRzeyC.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DmkJng-x.js +0 -89
- package/dist/template-DTZgnkl5.js +0 -190
- package/dist/trigger-CPjJ73Rc.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-8VIt8A1x.js +0 -54
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as C, computed as L, watch as E, resolveComponent as g, openBlock as o, createElementBlock as i, Fragment as y, toDisplayString as I, createCommentVNode as A, createElementVNode as M, createVNode as v, unref as u, renderList as S, createBlock as b, isRef as U, withCtx as F } from "vue";
|
|
2
|
-
import { u as T } from "./business-Bc-EMd2p.js";
|
|
3
|
-
function j(l, s, n) {
|
|
4
|
-
return l.some(
|
|
5
|
-
n instanceof Function ? n : (a) => a === s
|
|
6
|
-
) || l.push(s), l;
|
|
7
|
-
}
|
|
8
|
-
function q(l, s, n) {
|
|
9
|
-
return l.filter(
|
|
10
|
-
n instanceof Function ? (a) => !n(a) : (a) => a !== s
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
const D = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "fm-typo-en-body-lg-400"
|
|
16
|
-
}, K = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "space-y-4"
|
|
19
|
-
}, O = { key: 0 }, R = { key: 1 }, z = { key: 2 }, J = /* @__PURE__ */ N({
|
|
20
|
-
__name: "TargetLocationInput",
|
|
21
|
-
props: {
|
|
22
|
-
label: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "select"
|
|
28
|
-
},
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: Object,
|
|
31
|
-
required: !0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["update:model-value"],
|
|
35
|
-
setup(l, { emit: s }) {
|
|
36
|
-
const n = T(), a = l, c = C(""), w = L(() => n.locations.filter(
|
|
37
|
-
(d) => {
|
|
38
|
-
var t;
|
|
39
|
-
return d.name.toLowerCase().includes(c.value.toLowerCase()) || ((t = d == null ? void 0 : d.code) == null ? void 0 : t.toLowerCase().includes(c.value.toLowerCase()));
|
|
40
|
-
}
|
|
41
|
-
)), p = s;
|
|
42
|
-
function k(d, t) {
|
|
43
|
-
const m = d ? j(a.modelValue || [], t.toString()) : q(
|
|
44
|
-
a.modelValue || n.locations.map((V) => V._id.toString()),
|
|
45
|
-
t.toString()
|
|
46
|
-
);
|
|
47
|
-
return p("update:model-value", m);
|
|
48
|
-
}
|
|
49
|
-
const r = C(!1), $ = L(() => {
|
|
50
|
-
var m, V;
|
|
51
|
-
const t = ((m = a.modelValue) == null ? void 0 : m.slice(0, 5).map((h) => {
|
|
52
|
-
var f;
|
|
53
|
-
return ((f = n.locationById(h)) == null ? void 0 : f.name) || h;
|
|
54
|
-
})) || [];
|
|
55
|
-
return a.modelValue && ((V = a.modelValue) == null ? void 0 : V.length) > 5 && t.push(`+${a.modelValue.length - 5} more`), t;
|
|
56
|
-
});
|
|
57
|
-
return E(r, (d) => {
|
|
58
|
-
d && (c.value = "");
|
|
59
|
-
}), (d, t) => {
|
|
60
|
-
const m = g("FmCheckbox"), V = g("FmChip"), h = g("FmField"), f = g("FmTextField"), B = g("FmMenu");
|
|
61
|
-
return o(), i(y, null, [
|
|
62
|
-
l.label ? (o(), i("div", D, I(l.label), 1)) : A("", !0),
|
|
63
|
-
l.type === "checkbox" ? (o(), i("div", K, [
|
|
64
|
-
M("div", null, [
|
|
65
|
-
v(m, {
|
|
66
|
-
value: null,
|
|
67
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
68
|
-
label: "All locations",
|
|
69
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
70
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => p("update:model-value", e ? null : []))
|
|
71
|
-
}, null, 8, ["indeterminate", "model-value"])
|
|
72
|
-
]),
|
|
73
|
-
(o(!0), i(y, null, S(u(n).locations, (e) => (o(), i("div", {
|
|
74
|
-
key: e._id.toString()
|
|
75
|
-
}, [
|
|
76
|
-
v(m, {
|
|
77
|
-
value: e._id.toString(),
|
|
78
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
79
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
80
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
81
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
|
|
82
|
-
]))), 128))
|
|
83
|
-
])) : (o(), b(B, {
|
|
84
|
-
key: 2,
|
|
85
|
-
modelValue: u(r),
|
|
86
|
-
"onUpdate:modelValue": t[3] || (t[3] = (e) => U(r) ? r.value = e : null),
|
|
87
|
-
onMenuChanged: t[4] || (t[4] = (e) => r.value = e),
|
|
88
|
-
placement: "top-end"
|
|
89
|
-
}, {
|
|
90
|
-
"menu-button": F(() => [
|
|
91
|
-
v(h, {
|
|
92
|
-
"append-icon": u(r) ? "expand_more" : "expand_less",
|
|
93
|
-
class: "!h-auto"
|
|
94
|
-
}, {
|
|
95
|
-
default: F(() => [
|
|
96
|
-
!l.modelValue || l.modelValue.length == u(n).locations.length ? (o(), i("div", O, " All Locations ")) : l.modelValue.length ? (o(), i("div", z, [
|
|
97
|
-
(o(!0), i(y, null, S(u($), (e) => (o(), b(V, {
|
|
98
|
-
key: e,
|
|
99
|
-
label: e,
|
|
100
|
-
class: "max-w-[130px] text-ellipsis"
|
|
101
|
-
}, null, 8, ["label"]))), 128))
|
|
102
|
-
])) : (o(), i("div", R, "No Locations"))
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
}, 8, ["append-icon"])
|
|
106
|
-
]),
|
|
107
|
-
default: F(() => [
|
|
108
|
-
v(f, {
|
|
109
|
-
modelValue: u(c),
|
|
110
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) => U(c) ? c.value = e : null),
|
|
111
|
-
placeholder: "Search locations",
|
|
112
|
-
class: "my-8"
|
|
113
|
-
}, null, 8, ["modelValue"]),
|
|
114
|
-
v(m, {
|
|
115
|
-
class: "my-8",
|
|
116
|
-
value: null,
|
|
117
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
118
|
-
label: "All locations",
|
|
119
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
120
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) => p("update:model-value", e ? null : []))
|
|
121
|
-
}, null, 8, ["indeterminate", "model-value"]),
|
|
122
|
-
(o(!0), i(y, null, S(u(w), (e) => (o(), b(m, {
|
|
123
|
-
class: "my-8",
|
|
124
|
-
key: e._id.toString(),
|
|
125
|
-
value: e._id.toString(),
|
|
126
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
127
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
128
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
129
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["modelValue"]))
|
|
133
|
-
], 64);
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
export {
|
|
138
|
-
J as _
|
|
139
|
-
};
|
package/dist/Voucher-BhUAcPZg.js
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as h, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
|
|
2
|
-
import { _ as ae } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as re, components as f } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
|
|
5
|
-
import { p as A, a as ce } from "./plugins-C-CRzeyC.js";
|
|
6
|
-
import { useCoreStore as ie } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as se } from "./loading-C6Ouh0mG.js";
|
|
8
|
-
import { u as le } from "./business-Bc-EMd2p.js";
|
|
9
|
-
import { u as me } from "./campaign-DbJZEU7P.js";
|
|
10
|
-
import { g as ue, a as O, b as B } from "./campaign-BeF8kTyg.js";
|
|
11
|
-
import "./index-Cm2sBagk.js";
|
|
12
|
-
import { u as de } from "./template-DTZgnkl5.js";
|
|
13
|
-
import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js";
|
|
14
|
-
import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js";
|
|
15
|
-
import { u as ye } from "./vue-i18n-DVmD9I_o.js";
|
|
16
|
-
import { T as he } from "./trigger-CPjJ73Rc.js";
|
|
17
|
-
import { useRouter as ge } from "vue-router";
|
|
18
|
-
import { c as w } from "./index-DlJGd8RC.js";
|
|
19
|
-
import { R as H } from "./app-BGaUIdCr.js";
|
|
20
|
-
var _e = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
21
|
-
const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
|
|
22
|
-
__name: "Voucher",
|
|
23
|
-
setup(Ie) {
|
|
24
|
-
const { t: a } = ye(), $ = {
|
|
25
|
-
label: a("connect.voucher.createCampaign"),
|
|
26
|
-
value: "create",
|
|
27
|
-
isPrimary: !0,
|
|
28
|
-
prependIcon: "add"
|
|
29
|
-
}, L = re(), K = de("VOUCHER", L), N = le(), p = me(), { global: D, minor: T } = se, U = ge(), i = x({
|
|
30
|
-
searchKey: "",
|
|
31
|
-
location: [],
|
|
32
|
-
triggerType: []
|
|
33
|
-
}), _ = ee(
|
|
34
|
-
() => p.campaigns.voucher.filter(
|
|
35
|
-
(e) => q(e) && G(e)
|
|
36
|
-
)
|
|
37
|
-
), j = he.VOUCHER.map((e) => ({
|
|
38
|
-
label: e.name,
|
|
39
|
-
value: e.value
|
|
40
|
-
}));
|
|
41
|
-
function q(e) {
|
|
42
|
-
const o = i.value.location;
|
|
43
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
44
|
-
(r) => {
|
|
45
|
-
var s;
|
|
46
|
-
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
|
|
47
|
-
}
|
|
48
|
-
) : e.targetLocation.includes(o);
|
|
49
|
-
}
|
|
50
|
-
function G(e) {
|
|
51
|
-
const o = i.value.triggerType;
|
|
52
|
-
if (!o || o.length === 0) return !0;
|
|
53
|
-
const r = e.event.type;
|
|
54
|
-
return o.includes(r);
|
|
55
|
-
}
|
|
56
|
-
const X = [
|
|
57
|
-
{
|
|
58
|
-
header: a("connect.voucher.voucherTitle"),
|
|
59
|
-
accessorFn: (e) => e.name
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
header: a("connect.voucher.status"),
|
|
63
|
-
accessorFn: (e) => ue(e),
|
|
64
|
-
cell(e) {
|
|
65
|
-
return O(e.row.original);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
header: a("connect.voucher.summary"),
|
|
70
|
-
accessorFn: (e) => B(e)
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
header: a("connect.voucher.quota"),
|
|
74
|
-
accessorFn: (e) => {
|
|
75
|
-
var o;
|
|
76
|
-
return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
header: a("connect.voucher.claimed"),
|
|
81
|
-
accessorFn: (e) => {
|
|
82
|
-
var o;
|
|
83
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
header: a("connect.voucher.actions"),
|
|
88
|
-
cell(e) {
|
|
89
|
-
return m("div", { class: "flex items-center justify-end" }, [
|
|
90
|
-
m(f.FmButton, {
|
|
91
|
-
icon: "visibility",
|
|
92
|
-
variant: "tertiary",
|
|
93
|
-
iconColor: "neutral-gray-400",
|
|
94
|
-
onClick: async (o) => {
|
|
95
|
-
o.stopPropagation(), await U.push({
|
|
96
|
-
name: H["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
97
|
-
params: { id: e.row.original._id }
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}),
|
|
101
|
-
m(
|
|
102
|
-
f.FmMenu,
|
|
103
|
-
{
|
|
104
|
-
placement: "bottom-end",
|
|
105
|
-
onClick: (o) => {
|
|
106
|
-
o.stopPropagation();
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"menu-button": () => m(f.FmButton, {
|
|
111
|
-
icon: "more_vert",
|
|
112
|
-
iconColor: "neutral-gray-400",
|
|
113
|
-
variant: "tertiary"
|
|
114
|
-
}),
|
|
115
|
-
default: () => {
|
|
116
|
-
const o = [
|
|
117
|
-
m(
|
|
118
|
-
f.FmMenuItem,
|
|
119
|
-
{
|
|
120
|
-
onClick: async (r) => {
|
|
121
|
-
r.stopPropagation(), I(e.row.original);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: m(
|
|
126
|
-
"div",
|
|
127
|
-
{
|
|
128
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
129
|
-
},
|
|
130
|
-
a("connect.voucher.remove")
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
];
|
|
135
|
-
return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
|
|
136
|
-
m(f.FmMenuItem, {
|
|
137
|
-
label: a("connect.voucher.send"),
|
|
138
|
-
onClick: async (r) => {
|
|
139
|
-
var s;
|
|
140
|
-
r.stopPropagation(), (s = b.value) == null || s.showSheet({
|
|
141
|
-
campaignId: e.row.original._id
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
), o.unshift(
|
|
146
|
-
m(f.FmMenuItem, {
|
|
147
|
-
label: a("connect.voucher.share"),
|
|
148
|
-
onClick: async (r) => {
|
|
149
|
-
if (r.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
|
|
150
|
-
return await A.confirm(
|
|
151
|
-
"Cannot share a voucher that is not a simple claim.",
|
|
152
|
-
"Share Voucher",
|
|
153
|
-
"OK"
|
|
154
|
-
);
|
|
155
|
-
await ce(
|
|
156
|
-
`https://${ie().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
|
|
157
|
-
{
|
|
158
|
-
successMessage: "Voucher link copied to clipboard"
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
)), o;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
)
|
|
167
|
-
]);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
], P = x(), b = x();
|
|
171
|
-
async function I(e) {
|
|
172
|
-
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await T(
|
|
173
|
-
async () => {
|
|
174
|
-
await w.delete(e._id), await p.read("VOUCHER");
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
message: a("connect.voucher.removing", { name: e.name }),
|
|
178
|
-
successMessage: a("connect.voucher.removedSuccessfully", {
|
|
179
|
-
name: e.name
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
async function v(e) {
|
|
185
|
-
e ? await o() : K.open(async (r) => {
|
|
186
|
-
await o(r);
|
|
187
|
-
});
|
|
188
|
-
async function o(r) {
|
|
189
|
-
var s;
|
|
190
|
-
(s = P.value) == null || s.showSheet(
|
|
191
|
-
!0,
|
|
192
|
-
"VOUCHER",
|
|
193
|
-
e ? await w.readById(e._id) : void 0,
|
|
194
|
-
r
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function W(e) {
|
|
199
|
-
e.campaign._id && await new Promise((o) => {
|
|
200
|
-
L.open({
|
|
201
|
-
title: "Confirmation",
|
|
202
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
203
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
204
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
205
|
-
}).onPrimary(async () => {
|
|
206
|
-
var r;
|
|
207
|
-
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
208
|
-
}).onSecondary(async () => {
|
|
209
|
-
o();
|
|
210
|
-
});
|
|
211
|
-
}), await T(
|
|
212
|
-
async () => {
|
|
213
|
-
e.campaign._id ? await w.update(e.campaign._id, e) : await w.create(e), await p.read("VOUCHER");
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
message: a(
|
|
217
|
-
e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
|
|
218
|
-
),
|
|
219
|
-
successMessage: a(
|
|
220
|
-
e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
|
|
221
|
-
)
|
|
222
|
-
}
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
return oe(async () => {
|
|
226
|
-
await D(async () => {
|
|
227
|
-
await p.read("VOUCHER");
|
|
228
|
-
});
|
|
229
|
-
}), (e, o) => {
|
|
230
|
-
const r = d("FmPageHead"), s = d("FmSearch"), z = d("FmTable"), C = d("FmButton"), Q = d("FmListItem"), Z = d("FmList"), J = d("FmCard");
|
|
231
|
-
return u(), V(S, null, [
|
|
232
|
-
l(r, {
|
|
233
|
-
title: t(a)("connect.voucher.title"),
|
|
234
|
-
actions: t(_).length > 0 ? [$] : [],
|
|
235
|
-
"onClick:action": o[0] || (o[0] = () => v())
|
|
236
|
-
}, null, 8, ["title", "actions"]),
|
|
237
|
-
c("div", ve, [
|
|
238
|
-
l(s, {
|
|
239
|
-
modelValue: t(i).searchKey,
|
|
240
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
|
|
241
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
242
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
243
|
-
collapsible: ""
|
|
244
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
245
|
-
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), V(S, { key: 0 }, [
|
|
246
|
-
c("div", Ce, [
|
|
247
|
-
c("div", we, [
|
|
248
|
-
l(M, {
|
|
249
|
-
label: `${t(a)("connect.common.location")}: `,
|
|
250
|
-
"right-icon": "keyboard_arrow_down",
|
|
251
|
-
modelValue: t(i).location,
|
|
252
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
|
|
253
|
-
icon: "storefront",
|
|
254
|
-
"show-item-label": !0,
|
|
255
|
-
items: t(N).locationOptions
|
|
256
|
-
}, null, 8, ["label", "modelValue", "items"]),
|
|
257
|
-
l(M, {
|
|
258
|
-
label: "Type:",
|
|
259
|
-
"right-icon": "keyboard_arrow_down",
|
|
260
|
-
modelValue: t(i).triggerType,
|
|
261
|
-
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
|
|
262
|
-
icon: "filter_list",
|
|
263
|
-
"show-item-label": !0,
|
|
264
|
-
items: t(j)
|
|
265
|
-
}, null, 8, ["modelValue", "items"])
|
|
266
|
-
]),
|
|
267
|
-
l(s, {
|
|
268
|
-
modelValue: t(i).searchKey,
|
|
269
|
-
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
|
|
270
|
-
class: "xs:hidden",
|
|
271
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
272
|
-
collapsible: ""
|
|
273
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
274
|
-
]),
|
|
275
|
-
l(z, {
|
|
276
|
-
class: "xs:hidden",
|
|
277
|
-
"row-data": t(_),
|
|
278
|
-
"column-defs": X,
|
|
279
|
-
"search-value": t(i).searchKey,
|
|
280
|
-
"column-filter": [],
|
|
281
|
-
onRowClick: o[5] || (o[5] = (n) => v(n.original)),
|
|
282
|
-
"hide-footer": t(_).length < 10
|
|
283
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
284
|
-
l(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
285
|
-
default: F(() => [
|
|
286
|
-
(u(!0), V(S, null, te(t(_).filter(
|
|
287
|
-
(n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
288
|
-
), (n) => (u(), h(Q, {
|
|
289
|
-
key: n._id.toString(),
|
|
290
|
-
onClick: (k) => v(n),
|
|
291
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
292
|
-
}, {
|
|
293
|
-
default: F(() => {
|
|
294
|
-
var k;
|
|
295
|
-
return [
|
|
296
|
-
c("div", be, [
|
|
297
|
-
c("div", ke, [
|
|
298
|
-
(u(), h(ne(t(O)(n)))),
|
|
299
|
-
c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
|
|
300
|
-
]),
|
|
301
|
-
c("div", Ve, [
|
|
302
|
-
c("div", Se, g(n.name), 1),
|
|
303
|
-
c("div", Fe, g(t(B)(n)), 1)
|
|
304
|
-
])
|
|
305
|
-
]),
|
|
306
|
-
c("div", Le, [
|
|
307
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
308
|
-
key: 0,
|
|
309
|
-
icon: "visibility",
|
|
310
|
-
"icon-color": "neutral-gray-400",
|
|
311
|
-
variant: "tertiary",
|
|
312
|
-
onClick: async (y) => {
|
|
313
|
-
y.stopPropagation(), await t(U).push({
|
|
314
|
-
name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
315
|
-
params: { id: n._id }
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
}, null, 8, ["onClick"])) : E("", !0),
|
|
319
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
320
|
-
key: 1,
|
|
321
|
-
icon: "send",
|
|
322
|
-
"icon-color": "neutral-gray-400",
|
|
323
|
-
variant: "tertiary",
|
|
324
|
-
onClick: (y) => {
|
|
325
|
-
var R;
|
|
326
|
-
y.stopPropagation(), (R = t(b)) == null || R.showSheet({
|
|
327
|
-
campaignId: n._id
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
}, null, 8, ["onClick"])) : E("", !0),
|
|
331
|
-
l(C, {
|
|
332
|
-
icon: "delete",
|
|
333
|
-
"icon-color": "neutral-gray-400",
|
|
334
|
-
variant: "tertiary",
|
|
335
|
-
onClick: (y) => (y.stopPropagation(), I(n))
|
|
336
|
-
}, null, 8, ["onClick"])
|
|
337
|
-
])
|
|
338
|
-
];
|
|
339
|
-
}),
|
|
340
|
-
_: 2
|
|
341
|
-
}, 1032, ["onClick"]))), 128))
|
|
342
|
-
]),
|
|
343
|
-
_: 1
|
|
344
|
-
})
|
|
345
|
-
], 64)) : (u(), h(J, {
|
|
346
|
-
key: 1,
|
|
347
|
-
variant: "outlined",
|
|
348
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
349
|
-
}, {
|
|
350
|
-
default: F(() => [
|
|
351
|
-
o[7] || (o[7] = c("img", {
|
|
352
|
-
src: ae,
|
|
353
|
-
class: "aspect-square w-[150px]"
|
|
354
|
-
}, null, -1)),
|
|
355
|
-
c("div", Te, [
|
|
356
|
-
c("div", Ue, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
357
|
-
c("div", Pe, g(t(a)("connect.voucher.description")), 1)
|
|
358
|
-
]),
|
|
359
|
-
l(C, {
|
|
360
|
-
variant: "primary",
|
|
361
|
-
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
362
|
-
icon: "add",
|
|
363
|
-
onClick: o[6] || (o[6] = (n) => v())
|
|
364
|
-
}, null, 8, ["label"])
|
|
365
|
-
]),
|
|
366
|
-
_: 1
|
|
367
|
-
})),
|
|
368
|
-
l(pe, {
|
|
369
|
-
ref_key: "sheetRef",
|
|
370
|
-
ref: P,
|
|
371
|
-
"onSubmit:modelValue": W
|
|
372
|
-
}, null, 512),
|
|
373
|
-
l(fe, {
|
|
374
|
-
ref_key: "sendVoucherSheetRef",
|
|
375
|
-
ref: b
|
|
376
|
-
}, null, 512)
|
|
377
|
-
])
|
|
378
|
-
], 64);
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
export {
|
|
383
|
-
Je as default
|
|
384
|
-
};
|