@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2
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-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
- package/dist/AuditLogs-CWVUX5o0.js +2013 -0
- package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
- package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
- package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
- package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
- package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
- package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
- package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
- package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
- package/dist/Grab-L1h7bHD7.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
- package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
- package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
- package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
- package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
- package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
- package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
- package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
- package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
- package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
- package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
- package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
- package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
- package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
- package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
- package/dist/Review-CVBJlwGK.js +959 -0
- package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
- package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
- package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
- package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
- package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
- package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
- package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
- package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
- package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
- package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
- package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
- package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
- package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
- package/dist/app.js +4 -3
- package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
- package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
- package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
- package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
- package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
- package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
- package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
- package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
- package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
- package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
- package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
- package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
- package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
- package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
- package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
- package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
- package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
- package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
- package/dist/index-DW4-mTTG.js +52 -0
- package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
- package/dist/index-IPOrNVQw.js +67 -0
- package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
- package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
- package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
- package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
- package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
- package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
- package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
- package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
- package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
- package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-BM2Ygj-U.js +145 -0
- package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
- package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
- package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-tDq12e1p.js +188 -0
- package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
- package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
- package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
- package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
- package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
- package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
- package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-Ccb5IKBy.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
- package/dist/collection.fn-BqDPyvUe.js +0 -26
- package/dist/dto-CstKk_3g.js +0 -216
- package/dist/index-_KlH62Ed.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-CVxLIQ5K.js +0 -145
- package/dist/rule-builder-CIkRKgap.js +0 -102
- package/dist/template-wZEVj8lZ.js +0 -236
package/dist/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as i, computed as u } from "vue";
|
|
2
2
|
import { defineStore as w } from "pinia";
|
|
3
3
|
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
-
import { a as I, g as r, A as b, S, b as D } from "./index-
|
|
4
|
+
import { a as I, g as r, A as b, S, b as D } from "./index-0BNEvaYc.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
async readSettings(e) {
|
|
7
7
|
try {
|
|
@@ -1,15 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./index-
|
|
3
|
-
import {
|
|
1
|
+
import "./index-rwlkBKrS.js";
|
|
2
|
+
import "./index-Bqxe3Gbq.js";
|
|
3
|
+
import { h as s } from "./moment-D7p2TMB-.js";
|
|
4
|
+
import "./index-CWypTyOP.js";
|
|
5
|
+
import { e as f } from "./effect-Bt8PE3-M.js";
|
|
4
6
|
import { components as l } from "@feedmepos/ui-library";
|
|
5
|
-
import { i as
|
|
6
|
-
import { c as
|
|
7
|
-
import { u as
|
|
8
|
-
import { C as
|
|
9
|
-
import { c as
|
|
10
|
-
import { i as
|
|
7
|
+
import { i as h } from "./index-BP5qSDQw.js";
|
|
8
|
+
import { c as O } from "./rule-DC9my0Vg.js";
|
|
9
|
+
import { u as C } from "./business-BSe9C-xG.js";
|
|
10
|
+
import { C as m } from "./campaign.fn-CNOinW8t.js";
|
|
11
|
+
import { c as g } from "./string-Gcy5IM_H.js";
|
|
12
|
+
import { i as d } from "./plugins-YK45gSb1.js";
|
|
11
13
|
import { h as p } from "vue";
|
|
12
|
-
import { F as a } from "./campaign.enum-
|
|
14
|
+
import { F as a } from "./campaign.enum-CnMa2Tia.js";
|
|
15
|
+
function E(e) {
|
|
16
|
+
switch (e) {
|
|
17
|
+
case "PROMOTION":
|
|
18
|
+
return "Promotion";
|
|
19
|
+
case "VOUCHER":
|
|
20
|
+
return "Voucher";
|
|
21
|
+
case "CREDIT":
|
|
22
|
+
return "Credit";
|
|
23
|
+
case "POINT":
|
|
24
|
+
return "Experience";
|
|
25
|
+
case "COIN":
|
|
26
|
+
return "Point";
|
|
27
|
+
case "GAME":
|
|
28
|
+
return "Game";
|
|
29
|
+
default:
|
|
30
|
+
return e;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const G = {
|
|
34
|
+
formattedType: E
|
|
35
|
+
}, o = d.global.t;
|
|
36
|
+
function I() {
|
|
37
|
+
const e = d.global.locale;
|
|
38
|
+
return typeof e == "string" ? e : e.value;
|
|
39
|
+
}
|
|
40
|
+
function u(e) {
|
|
41
|
+
return new Intl.DateTimeFormat(I(), {
|
|
42
|
+
day: "2-digit",
|
|
43
|
+
month: "short",
|
|
44
|
+
year: "numeric"
|
|
45
|
+
}).format(new Date(e));
|
|
46
|
+
}
|
|
13
47
|
function c(e) {
|
|
14
48
|
return p(
|
|
15
49
|
"div",
|
|
@@ -22,12 +56,12 @@ function c(e) {
|
|
|
22
56
|
]
|
|
23
57
|
);
|
|
24
58
|
}
|
|
25
|
-
const
|
|
59
|
+
const H = {
|
|
26
60
|
[a.enum.CREDIT]: {
|
|
27
61
|
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
28
62
|
icon: "local_activity",
|
|
29
63
|
get name() {
|
|
30
|
-
return o
|
|
64
|
+
return o("connect.campaign.common.typeName.CREDIT");
|
|
31
65
|
},
|
|
32
66
|
chip() {
|
|
33
67
|
return c(this);
|
|
@@ -37,7 +71,7 @@ const D = {
|
|
|
37
71
|
chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
|
|
38
72
|
icon: "loyalty",
|
|
39
73
|
get name() {
|
|
40
|
-
return o
|
|
74
|
+
return o("connect.campaign.common.typeName.PROMOTION");
|
|
41
75
|
},
|
|
42
76
|
chip() {
|
|
43
77
|
return c(this);
|
|
@@ -47,7 +81,7 @@ const D = {
|
|
|
47
81
|
chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
|
|
48
82
|
icon: "sell",
|
|
49
83
|
get name() {
|
|
50
|
-
return o
|
|
84
|
+
return o("connect.campaign.common.typeName.VOUCHER");
|
|
51
85
|
},
|
|
52
86
|
chip() {
|
|
53
87
|
return c(this);
|
|
@@ -57,7 +91,7 @@ const D = {
|
|
|
57
91
|
chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
|
|
58
92
|
icon: "award_star",
|
|
59
93
|
get name() {
|
|
60
|
-
return o
|
|
94
|
+
return o("connect.campaign.common.typeName.POINT");
|
|
61
95
|
},
|
|
62
96
|
chip() {
|
|
63
97
|
return c(this);
|
|
@@ -67,7 +101,7 @@ const D = {
|
|
|
67
101
|
chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
68
102
|
icon: "campaign",
|
|
69
103
|
get name() {
|
|
70
|
-
return o
|
|
104
|
+
return o("connect.campaign.common.typeName.BROADCAST");
|
|
71
105
|
},
|
|
72
106
|
chip() {
|
|
73
107
|
return c(this);
|
|
@@ -77,7 +111,7 @@ const D = {
|
|
|
77
111
|
chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
|
|
78
112
|
icon: "database",
|
|
79
113
|
get name() {
|
|
80
|
-
return o
|
|
114
|
+
return o("connect.campaign.common.typeName.GAME");
|
|
81
115
|
},
|
|
82
116
|
chip() {
|
|
83
117
|
return c(this);
|
|
@@ -87,7 +121,7 @@ const D = {
|
|
|
87
121
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
88
122
|
icon: "editor_choice",
|
|
89
123
|
get name() {
|
|
90
|
-
return o
|
|
124
|
+
return o("connect.campaign.common.typeName.REWARD_POOL");
|
|
91
125
|
},
|
|
92
126
|
chip() {
|
|
93
127
|
return c(this);
|
|
@@ -97,7 +131,7 @@ const D = {
|
|
|
97
131
|
chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
|
|
98
132
|
icon: "monetization_on",
|
|
99
133
|
get name() {
|
|
100
|
-
return o
|
|
134
|
+
return o("connect.campaign.common.typeName.COIN");
|
|
101
135
|
},
|
|
102
136
|
chip() {
|
|
103
137
|
return c(this);
|
|
@@ -107,111 +141,125 @@ const D = {
|
|
|
107
141
|
chipClass: "",
|
|
108
142
|
icon: "",
|
|
109
143
|
get name() {
|
|
110
|
-
return o
|
|
144
|
+
return o("connect.campaign.common.typeName.MEMBERSHIP");
|
|
111
145
|
},
|
|
112
146
|
chip() {
|
|
113
147
|
return c(this);
|
|
114
148
|
}
|
|
115
149
|
},
|
|
116
|
-
// TODO: confirm color
|
|
117
150
|
[a.enum.MISSION]: {
|
|
118
151
|
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
119
152
|
icon: "editor_choice",
|
|
120
153
|
get name() {
|
|
121
|
-
return o
|
|
154
|
+
return o("connect.campaign.common.typeName.MISSION");
|
|
122
155
|
},
|
|
123
156
|
chip() {
|
|
124
157
|
return c(this);
|
|
125
158
|
}
|
|
159
|
+
},
|
|
160
|
+
[a.enum.GRAB]: {
|
|
161
|
+
chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
|
|
162
|
+
icon: "editor_choice",
|
|
163
|
+
name: "Grab",
|
|
164
|
+
chip() {
|
|
165
|
+
return c(this);
|
|
166
|
+
}
|
|
126
167
|
}
|
|
127
168
|
};
|
|
128
|
-
function
|
|
129
|
-
const t =
|
|
169
|
+
function U(e) {
|
|
170
|
+
const t = R(e), r = {
|
|
130
171
|
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
131
172
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
132
173
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
133
174
|
};
|
|
134
175
|
return e.type == "VOUCHER" ? p(l.FmChip, {
|
|
135
|
-
class:
|
|
136
|
-
label:
|
|
137
|
-
o.global.t(`connect.campaign.common.status.${t}`)
|
|
138
|
-
),
|
|
176
|
+
class: r[t],
|
|
177
|
+
label: g.title(o(`connect.campaign.common.status.${t}`)),
|
|
139
178
|
compact: !0
|
|
140
179
|
}) : p(l.FmChip, {
|
|
141
|
-
class:
|
|
142
|
-
label:
|
|
143
|
-
o.global.t(`connect.campaign.common.status.${t}`)
|
|
144
|
-
),
|
|
180
|
+
class: r[t],
|
|
181
|
+
label: g.title(o(`connect.campaign.common.status.${t}`)),
|
|
145
182
|
compact: !0
|
|
146
183
|
});
|
|
147
184
|
}
|
|
148
|
-
function
|
|
185
|
+
function B(e) {
|
|
186
|
+
const t = e.timeframeOptions;
|
|
187
|
+
if (!t || !t.start && !t.end)
|
|
188
|
+
return o("connect.campaign.common.always_active");
|
|
189
|
+
if (!t.start && t.end)
|
|
190
|
+
return o("connect.campaign.common.valid_until", {
|
|
191
|
+
date: u(t.end)
|
|
192
|
+
});
|
|
193
|
+
const r = u(t.start), n = t.end ? u(t.end) : o("connect.campaign.common.unlimited");
|
|
194
|
+
return `${r} -> ${n}`;
|
|
195
|
+
}
|
|
196
|
+
function F(e) {
|
|
149
197
|
const { campaign: t } = e;
|
|
150
|
-
function
|
|
198
|
+
function r(n) {
|
|
151
199
|
if (!n || !n.start && !n.end)
|
|
152
200
|
return "connect.campaign.common.always";
|
|
153
|
-
const
|
|
154
|
-
return `${
|
|
201
|
+
const i = n.start ? u(n.start) : "From campaign creation", y = n.end ? u(n.end) : "Never ends";
|
|
202
|
+
return `${i} - ${y}`;
|
|
155
203
|
}
|
|
156
204
|
return {
|
|
157
205
|
"connect.campaign.common.campaign_name": t.name,
|
|
158
|
-
"connect.campaign.common.campaign_period":
|
|
206
|
+
"connect.campaign.common.campaign_period": r(
|
|
159
207
|
t.timeframeOptions
|
|
160
208
|
),
|
|
161
209
|
get "connect.campaign.common.next_schedule_at"() {
|
|
162
|
-
if (t.event.type != "SCHEDULE" || !t.event.rule || !
|
|
210
|
+
if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !h(t.event.rule))
|
|
163
211
|
return;
|
|
164
|
-
const n =
|
|
212
|
+
const n = O(
|
|
165
213
|
t.event.rule.rules.g_schedule
|
|
166
214
|
);
|
|
167
|
-
return n ?
|
|
215
|
+
return n ? s(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
168
216
|
},
|
|
169
217
|
get "connect.campaign.common.discount_type"() {
|
|
170
|
-
if (t.type == "PROMOTION") return
|
|
218
|
+
if (t.type == "PROMOTION") return f(t.effect);
|
|
171
219
|
if ("configs" in e && e.configs.type == "VOUCHER")
|
|
172
|
-
return
|
|
220
|
+
return f(e.configs.extras.effect);
|
|
173
221
|
},
|
|
174
222
|
get "connect.campaign.common.available_at"() {
|
|
175
223
|
return t.targetLocation ? t.targetLocation.length > 0 ? t.targetLocation.map(
|
|
176
|
-
(n) =>
|
|
224
|
+
(n) => C().locationItems.find((i) => i.value == n).label
|
|
177
225
|
).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
|
|
178
226
|
}
|
|
179
227
|
};
|
|
180
228
|
}
|
|
181
|
-
function
|
|
182
|
-
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ?
|
|
183
|
-
e.timeframeOptions.start ??
|
|
184
|
-
e.timeframeOptions.end ??
|
|
185
|
-
) ? "active" :
|
|
229
|
+
function R(e) {
|
|
230
|
+
return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? s().isBetween(
|
|
231
|
+
e.timeframeOptions.start ?? s().subtract(1, "d"),
|
|
232
|
+
e.timeframeOptions.end ?? s().add(1, "d")
|
|
233
|
+
) ? "active" : s().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
186
234
|
}
|
|
187
|
-
function
|
|
188
|
-
var t,
|
|
235
|
+
function V(e) {
|
|
236
|
+
var t, r;
|
|
189
237
|
switch (e.event.type) {
|
|
190
238
|
case "BILL_COMPLETED":
|
|
191
|
-
const n = `Spend to get ${
|
|
239
|
+
const n = `Spend to get ${m.formattedType(e.type)}`;
|
|
192
240
|
switch (e.type) {
|
|
193
241
|
case "POINT":
|
|
194
242
|
case "CREDIT":
|
|
195
243
|
case "COIN":
|
|
196
|
-
return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${
|
|
244
|
+
return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${m.formattedType(e.type)}` : `Every ${e.earningOption.every} amount spent get ${e.earningOption.amount} ${m.formattedType(e.type)}`;
|
|
197
245
|
case "VOUCHER":
|
|
198
|
-
const
|
|
199
|
-
return
|
|
246
|
+
const i = (r = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : r.effect;
|
|
247
|
+
return i ? `${n} - ${f(i)}` : n;
|
|
200
248
|
default:
|
|
201
249
|
return n;
|
|
202
250
|
}
|
|
203
251
|
case "FEEDBACK":
|
|
204
|
-
return `Give feedback to receive ${
|
|
252
|
+
return `Give feedback to receive ${m.formattedType(e.type)}`;
|
|
205
253
|
case "SCHEDULE":
|
|
206
|
-
return `Receive ${
|
|
254
|
+
return `Receive ${m.formattedType(e.type)} on scheduled time`;
|
|
207
255
|
case "SIMPLE_CLAIM":
|
|
208
256
|
return "Simple claim voucher";
|
|
209
257
|
case "TIER_UPGRADED":
|
|
210
|
-
return `Receive ${
|
|
258
|
+
return `Receive ${m.formattedType(e.type)} when member tier upgraded`;
|
|
211
259
|
case "MEMBERSHIP_JOINED":
|
|
212
|
-
return `Receive ${
|
|
260
|
+
return `Receive ${m.formattedType(e.type)} when member joined`;
|
|
213
261
|
case "MAKING_ORDER":
|
|
214
|
-
return e.type !== "PROMOTION" ? void 0 :
|
|
262
|
+
return e.type !== "PROMOTION" ? void 0 : f(e.effect);
|
|
215
263
|
default:
|
|
216
264
|
throw new Error(
|
|
217
265
|
`Not implemented ${JSON.stringify({ cause: e.event.type })}`
|
|
@@ -219,9 +267,11 @@ function P(e) {
|
|
|
219
267
|
}
|
|
220
268
|
}
|
|
221
269
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
270
|
+
H as C,
|
|
271
|
+
R as a,
|
|
272
|
+
U as b,
|
|
273
|
+
V as c,
|
|
274
|
+
G as d,
|
|
275
|
+
F as e,
|
|
276
|
+
B as g
|
|
227
277
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore as w } from "pinia";
|
|
2
2
|
import { reactive as I, onMounted as b, ref as o } from "vue";
|
|
3
|
-
import { g as a, S as l, b as d } from "./index-
|
|
3
|
+
import { g as a, S as l, b as d } from "./index-0BNEvaYc.js";
|
|
4
4
|
const s = () => {
|
|
5
5
|
const e = l.getBusinessId();
|
|
6
6
|
if (!e) throw new Error("Invalid business ID");
|
|
@@ -145,13 +145,14 @@ const s = () => {
|
|
|
145
145
|
credit: [],
|
|
146
146
|
token: [],
|
|
147
147
|
mission: [],
|
|
148
|
+
grab: [],
|
|
148
149
|
all: []
|
|
149
150
|
});
|
|
150
151
|
b(() => {
|
|
151
152
|
console.log("🔧 CampaignStore Installed");
|
|
152
153
|
});
|
|
153
154
|
const t = o([]), n = o([]), c = o([]);
|
|
154
|
-
async function m(
|
|
155
|
+
async function m(h) {
|
|
155
156
|
const i = await u.readAll({
|
|
156
157
|
limit: 1e3,
|
|
157
158
|
skip: 0,
|
|
@@ -160,7 +161,9 @@ const s = () => {
|
|
|
160
161
|
});
|
|
161
162
|
Object.keys(e).forEach((r) => {
|
|
162
163
|
e[r] = [];
|
|
163
|
-
}), e.all = i.resources.filter(
|
|
164
|
+
}), e.all = i.resources.filter(
|
|
165
|
+
(r) => r.type !== "MEMBERSHIP"
|
|
166
|
+
);
|
|
164
167
|
for (const r of i.resources)
|
|
165
168
|
switch (r.type) {
|
|
166
169
|
case "PROMOTION":
|
|
@@ -187,12 +190,15 @@ const s = () => {
|
|
|
187
190
|
case "MISSION":
|
|
188
191
|
e.mission.push(r);
|
|
189
192
|
break;
|
|
193
|
+
case "GRAB":
|
|
194
|
+
e.grab.push(r);
|
|
195
|
+
break;
|
|
190
196
|
}
|
|
191
197
|
}
|
|
192
|
-
async function
|
|
198
|
+
async function g() {
|
|
193
199
|
n.value = await u.readGroups();
|
|
194
200
|
}
|
|
195
|
-
async function
|
|
201
|
+
async function y() {
|
|
196
202
|
t.value = await f.readAll();
|
|
197
203
|
}
|
|
198
204
|
return {
|
|
@@ -203,8 +209,8 @@ const s = () => {
|
|
|
203
209
|
voucher: c,
|
|
204
210
|
// Actions
|
|
205
211
|
read: m,
|
|
206
|
-
readGroups:
|
|
207
|
-
readTemplates:
|
|
212
|
+
readGroups: g,
|
|
213
|
+
readTemplates: y
|
|
208
214
|
};
|
|
209
215
|
});
|
|
210
216
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as E } from "./index-
|
|
1
|
+
import { z as E } from "./index-Bqxe3Gbq.js";
|
|
2
2
|
const M = E.enum([
|
|
3
3
|
"VOUCHER",
|
|
4
4
|
"PROMOTION",
|
|
@@ -9,7 +9,8 @@ const M = E.enum([
|
|
|
9
9
|
"COIN",
|
|
10
10
|
"REWARD_POOL",
|
|
11
11
|
"GAME",
|
|
12
|
-
"MISSION"
|
|
12
|
+
"MISSION",
|
|
13
|
+
"GRAB"
|
|
13
14
|
]), O = E.enum([
|
|
14
15
|
"TIME_BASED_PROMOTION",
|
|
15
16
|
"GAME_PROMOTION",
|