@feedmepos/mf-connect 0.1.83-prod → 0.1.85-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-1OYb8L9c.js → Analytic-BjCcva28.js} +11 -11
- package/dist/{App-oQ4_lEV2.js → App-CJl6tMfn.js} +7 -7
- package/dist/{Bin-CQ8CYWAf.js → Bin-e4Vwyfbp.js} +8 -8
- package/dist/{Broadcast-BLq5lca6.js → Broadcast-WWNRyELz.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-0BKgyMxn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-J3EHIto7.js} +6 -6
- package/dist/{Card-BbcMCzvO.js → Card-Doc6LOzs.js} +19 -19
- package/dist/{Collections-0LOyEUoF.js → Collections-DfrqlwGy.js} +8 -8
- package/dist/{Credit-Crrc3MSu.js → Credit-DfA3WdZT.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cic4vFbP.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js → EffectSheet.vue_vue_type_style_index_0_lang-COqzGZHo.js} +6 -6
- package/dist/{Experience-DJiUmONI.js → Experience-ByuixxAy.js} +8 -8
- package/dist/{FileSaver.min-CFEGc8v5.js → FileSaver.min-Cb2PeLDd.js} +1 -1
- package/dist/{Game-ChHy4S4P.js → Game-Co_u5JSG.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js → ImageInput.vue_vue_type_script_setup_true_lang-Ciq01AFd.js} +1 -1
- package/dist/{Index-CL5auUCN.js → Index-BHT-38Ch.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-H5IjhmOA.js → LottieAnimation.vue_vue_type_script_setup_true_lang-boR37brc.js} +1 -1
- package/dist/{MainLayout-Bf4G5U5F.js → MainLayout-ONCk7MJK.js} +1 -1
- package/dist/{Marketing-cNwSm-dt.js → Marketing-BYfDY-zv.js} +6 -6
- package/dist/{Member-fT7a7zFo.js → Member-DPA-A6u2.js} +11 -11
- package/dist/{MemberList-gEN36Erj.js → MemberList-CcXEA6on.js} +27 -27
- package/dist/{MemberTransactions-C4YgiUw-.js → MemberTransactions-CyTNBdt3.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BNDrmYqp.js → MessageInput.vue_vue_type_script_setup_true_lang-CiFkbATJ.js} +9885 -9726
- package/dist/{Mission-Bz9P2pjX.js → Mission-BZz-SC9d.js} +9 -9
- package/dist/{Overview-BG3Z7Daz.js → Overview-DnfKpA-t.js} +19 -19
- package/dist/{Point-BBeSJ5p5.js → Point-BeElhOr-.js} +8 -8
- package/dist/{Promotion-VmaOESn2.js → Promotion-Da8BxPFh.js} +9 -9
- package/dist/{Queue-DKtUhOBh.js → Queue-BfwE5cgy.js} +11 -11
- package/dist/{Record-Cb45m9I8.js → Record-DhkDlZ2f.js} +9 -9
- package/dist/{Reward-D_uvCEMe.js → Reward-Czkm7_oG.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-yUUMGEUJ.js → RewardGroup.vue_vue_type_script_setup_true_lang-CsM3epgn.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CIb7igvo.js → RuleGroup.vue_vue_type_script_setup_true_lang-3vLz2oFZ.js} +15 -15
- package/dist/{Segment-BJ8XUyeG.js → Segment-D0YHmgsJ.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js → SelectItems.vue_vue_type_script_setup_true_lang-DpM5Mglj.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DC6OQ7Zb.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-2pBfVd1s.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CrVxIYv3.js} +4 -4
- package/dist/{Setting-CS1wSxO9.js → Setting-CTh46A28.js} +14 -14
- package/dist/{SettingAdvertisements-CWP7VthZ.js → SettingAdvertisements-DD7-Yg_m.js} +12 -12
- package/dist/{Store-cy0uZfSE.js → Store-r6_TrozR.js} +262 -232
- package/dist/{StoreRewards-DDAvmlEn.js → StoreRewards-DT4doSpz.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CevWXAb6.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C_cTJbEf.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C5jRK0dU.js} +1 -1
- package/dist/{Tier-CUT_0eYp.js → Tier-BmoObMNK.js} +22 -22
- package/dist/{Title-DcelZU7H.js → Title-BL1aP1Pz.js} +20 -20
- package/dist/{Transaction-CwcJnFIO.js → Transaction-BoIkA8Ow.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BuDS-vUd.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-WtyCkEnC.js} +6 -6
- package/dist/{Voucher-z6o5rwFx.js → Voucher-B_y8WCNE.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-FVdeM5pH.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DsEUCfQ0.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js → ZodTextField.vue_vue_type_script_setup_true_lang-DEco-KD8.js} +2 -2
- package/dist/{app-BUFlIAB5.js → app-97PQLirJ.js} +931 -875
- package/dist/app.js +1 -1
- package/dist/{business-CEL6Cxr7.js → business-DM8Ddouf.js} +1 -1
- package/dist/{campaign-CfB7ZWIg.js → campaign-Btb4iifz.js} +8 -8
- package/dist/{campaign-Bz3O-DFr.js → campaign-CT932f3F.js} +1 -1
- package/dist/{campaign.enum-CCKHGvL9.js → campaign.enum-CsDJx7Gs.js} +1 -1
- package/dist/{campaign.fn-Cu0sRSpP.js → campaign.fn-BQMZndjC.js} +147 -147
- package/dist/{collectible.enum-DeWSJ9OK.js → collectible.enum-DF7kK9FH.js} +1 -1
- package/dist/{collection.fn-hPDt2qvz.js → collection.fn-BhN-PqZL.js} +2 -2
- package/dist/{dto-BKwcpb4T.js → dto-h7iFVkWq.js} +4 -4
- package/dist/{effect-D070CPN_.js → effect-uP1iMZtY.js} +1 -1
- package/dist/{email-addresses-C0fE6EMy.js → email-addresses-Dqg2mLXX.js} +2 -2
- package/dist/{export-CG1ypExs.js → export-B-3Bdt9C.js} +3 -3
- package/dist/{helper-C9NBolO7.js → helper-BoId9qqd.js} +1 -1
- package/dist/{index-DcfdUpTw.js → index-Ba9cuHtD.js} +1 -1
- package/dist/{index-CZoTFXja.js → index-Bg4zAuYE.js} +3 -3
- package/dist/{index-6rFsv3Yg.js → index-Bq2t_zdK.js} +1 -1
- package/dist/{index-D7AT7i0e.js → index-BrxGi33h.js} +3 -3
- package/dist/{index-4gCsL8Hl.js → index-BumlxSfY.js} +6 -6
- package/dist/{index-DLnZyneY.js → index-Bvbp3blc.js} +1 -1
- package/dist/{index-BGi7UFjn.js → index-CMpR1HzN.js} +1 -1
- package/dist/{index-B613auFn.js → index-CuK11tsI.js} +1 -1
- package/dist/{index-BXSp11TE.js → index-D8MQmF1t.js} +4 -4
- package/dist/{index-DGNPGZh4.js → index-DIkzKoq5.js} +1 -1
- package/dist/index-DRuE_qHT.js +28897 -0
- package/dist/index-DkPJyXs4.js +30096 -0
- package/dist/{index-B30LtrWw.js → index-MnludiWX.js} +1 -1
- package/dist/{index.esm2017-D0u5JnGx.js → index.esm2017-RL-h3I1f.js} +1 -1
- package/dist/{loading-Rn4BXFlo.js → loading-BeeF8Jj7.js} +1 -1
- package/dist/{lodash-Ds-QoR_N.js → lodash-DmWp55y7.js} +1 -1
- package/dist/{membership-BjklIT2n.js → membership-BUq0y6RI.js} +3 -3
- package/dist/{money-DMyZXL-e.js → money-C4X1MSTz.js} +1 -1
- package/dist/{number-Cyny8l0t.js → number-DKpaYsjH.js} +1 -1
- package/dist/objectid-DFEazwI8.js +145 -0
- package/dist/{plugins-BdQ8LmZm.js → plugins-Bke3udWH.js} +3 -3
- package/dist/{reward-ZGs3fpY1.js → reward-DffpddMv.js} +1 -1
- package/dist/{rule-BH0ICJcx.js → rule-DnqP9S9V.js} +3 -3
- package/dist/{rule-builder-D2sz7Xd9.js → rule-builder-nJ3DJ_PE.js} +1 -1
- package/dist/{template-_QJbP7yG.js → template-CGZdUvtU.js} +7 -7
- package/dist/{timezone-ulqdIvC-.js → timezone-CEmNm2CH.js} +5 -2
- package/dist/{trigger-BiXZCT3j.js → trigger-BvNAwfbO.js} +5 -5
- package/dist/{usePagination-Ck7buuI_.js → usePagination-YjYwRlFU.js} +1 -1
- package/dist/{user-BWTfkoD6.js → user-BQyBzZqG.js} +1 -1
- package/dist/{vue-i18n-CmMTYitu.js → vue-i18n-BM_oLuoV.js} +203 -203
- package/dist/{xlsx-BF8PJO-P.js → xlsx-CZljAb-V.js} +1 -1
- package/dist/{zod-C5iXeYjP.js → zod-D502pprc.js} +1 -1
- package/package.json +4 -4
- package/dist/index-CM-qkxMr.js +0 -30933
- package/dist/index-DDMr6_UT.js +0 -32272
- package/dist/objectid-Bs1Sha1n.js +0 -145
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as h, createBlock as M, withCtx as
|
|
1
|
+
import { defineComponent as te, computed as L, resolveComponent as _, openBlock as h, createBlock as M, withCtx as B, createElementVNode as V, createElementBlock as D, createVNode as r, createCommentVNode as E, toDisplayString as K, unref as e, Fragment as Y, renderList as ce, ref as N, isRef as re, reactive as Ye, onMounted as he, watch as Pe, toRaw as ze, createTextVNode as me, h as Je } from "vue";
|
|
2
2
|
import { _ as Ge } from "./tier-BJDhpH6X.js";
|
|
3
3
|
import { useDialog as Ee, useDialogChild as je, components as Xe } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as A, e as
|
|
5
|
-
import { u as Le } from "./loading-
|
|
6
|
-
import { u as Te, C as
|
|
7
|
-
import { m as Qe, n as et, o as tt, p as Ae, q as nt } from "./index-
|
|
4
|
+
import { c as A, e as _e, S as Ze } from "./index-DRuE_qHT.js";
|
|
5
|
+
import { u as Le } from "./loading-BeeF8Jj7.js";
|
|
6
|
+
import { u as Te, C as fe } from "./membership-BUq0y6RI.js";
|
|
7
|
+
import { m as Qe, n as et, o as tt, p as Ae, q as nt } from "./index-D8MQmF1t.js";
|
|
8
8
|
import { a as ot, c as Fe } from "./object-qECH92oz.js";
|
|
9
|
-
import { _ as ae } from "./lodash-
|
|
10
|
-
import { c as
|
|
11
|
-
import { u as
|
|
12
|
-
import { Z as Q, g as G, a as X } from "./zod-
|
|
13
|
-
import { z as ee, R as at } from "./app-
|
|
9
|
+
import { _ as ae } from "./lodash-DmWp55y7.js";
|
|
10
|
+
import { c as ue } from "./index-DkPJyXs4.js";
|
|
11
|
+
import { u as xe } from "./vue-i18n-BM_oLuoV.js";
|
|
12
|
+
import { Z as Q, g as G, a as X } from "./zod-D502pprc.js";
|
|
13
|
+
import { z as ee, R as at } from "./app-97PQLirJ.js";
|
|
14
14
|
import { u as Se } from "./app-wDQR6dpb.js";
|
|
15
|
-
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as lt, p as
|
|
15
|
+
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DEco-KD8.js";
|
|
16
|
+
import { a as lt, p as be, n as st, f as Ve } from "./plugins-Bke3udWH.js";
|
|
17
17
|
import { J as ke } from "./JsonViewer-v8_C7l5N.js";
|
|
18
|
-
import { _ as rt } from "./index-
|
|
19
|
-
import { _ as it } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
18
|
+
import { _ as rt } from "./index-Bg4zAuYE.js";
|
|
19
|
+
import { _ as it } from "./ImageInput.vue_vue_type_script_setup_true_lang-Ciq01AFd.js";
|
|
20
20
|
import { _ as dt } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
21
|
-
import { z as ut, a as ct } from "./money-
|
|
22
|
-
import { F as mt } from "./number-
|
|
23
|
-
import { a as pt, t as ft } from "./helper-
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./index-
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./index-
|
|
28
|
-
import { m as yt } from "./index-
|
|
29
|
-
import { m as
|
|
21
|
+
import { z as ut, a as ct } from "./money-C4X1MSTz.js";
|
|
22
|
+
import { F as mt } from "./number-DKpaYsjH.js";
|
|
23
|
+
import { a as pt, t as ft } from "./helper-BoId9qqd.js";
|
|
24
|
+
import "./index-DIkzKoq5.js";
|
|
25
|
+
import "./index-BumlxSfY.js";
|
|
26
|
+
import "./index-Ba9cuHtD.js";
|
|
27
|
+
import "./index-BrxGi33h.js";
|
|
28
|
+
import { m as yt } from "./index-CMpR1HzN.js";
|
|
29
|
+
import { m as ge } from "./index-Bq2t_zdK.js";
|
|
30
30
|
import { useRouter as bt } from "vue-router";
|
|
31
31
|
function Ke(x) {
|
|
32
|
-
return
|
|
32
|
+
return ue.DineroFactory(x).toUnit();
|
|
33
33
|
}
|
|
34
34
|
function He(x, S, a, g, s = [], v = []) {
|
|
35
35
|
const o = rt.compact(
|
|
@@ -55,7 +55,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
55
55
|
});
|
|
56
56
|
},
|
|
57
57
|
{}
|
|
58
|
-
), i =
|
|
58
|
+
), i = ue.Calculator.calculate({
|
|
59
59
|
items: {
|
|
60
60
|
0: {
|
|
61
61
|
quantity: 1,
|
|
@@ -64,7 +64,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
64
64
|
level: 0,
|
|
65
65
|
type: {
|
|
66
66
|
type: "BY_AMOUNT",
|
|
67
|
-
amount:
|
|
67
|
+
amount: ue.DineroFactory(a).subtract(ue.Dinero.fromNumber({ number: g }).toObject()).toObject()
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
},
|
|
@@ -80,7 +80,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
80
80
|
name: t.name,
|
|
81
81
|
taxCode: t.taxCode,
|
|
82
82
|
rate: t.rate,
|
|
83
|
-
total:
|
|
83
|
+
total: ue.DineroFactory({
|
|
84
84
|
...i.items[0].taxes[t.taxCode].amount
|
|
85
85
|
}).convertPrecision(2).toObject()
|
|
86
86
|
}));
|
|
@@ -88,8 +88,8 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
88
88
|
function qe(x, S, a) {
|
|
89
89
|
return x ? x.reduce((g, s) => {
|
|
90
90
|
var v;
|
|
91
|
-
return (v = a.find((o) => o.systemCode === s.systemCode)) != null && v.inclusive || (g =
|
|
92
|
-
},
|
|
91
|
+
return (v = a.find((o) => o.systemCode === s.systemCode)) != null && v.inclusive || (g = ue.DineroFactory(g.toObject()).add(s.total)), g;
|
|
92
|
+
}, ue.DineroFactory(S)).toObject() : ue.DineroFactory(S).toObject();
|
|
93
93
|
}
|
|
94
94
|
const gt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, vt = ["src"], ht = {
|
|
95
95
|
key: 2,
|
|
@@ -121,7 +121,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
121
121
|
variant: "outlined",
|
|
122
122
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
123
123
|
}, {
|
|
124
|
-
default:
|
|
124
|
+
default: B(() => [
|
|
125
125
|
V("div", gt, [
|
|
126
126
|
x.bundle.image ? (h(), D("img", {
|
|
127
127
|
key: 1,
|
|
@@ -143,13 +143,13 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
143
143
|
])) : E("", !0),
|
|
144
144
|
V("div", xt, [
|
|
145
145
|
r(d, { placement: "bottom-end" }, {
|
|
146
|
-
"menu-button":
|
|
146
|
+
"menu-button": B(() => [
|
|
147
147
|
r(u, {
|
|
148
148
|
icon: "more_vert",
|
|
149
149
|
variant: "tertiary"
|
|
150
150
|
})
|
|
151
151
|
]),
|
|
152
|
-
default:
|
|
152
|
+
default: B(() => [
|
|
153
153
|
r(f, {
|
|
154
154
|
onClick: c[0] || (c[0] = (l) => g("edit", x.bundle)),
|
|
155
155
|
icon: "edit",
|
|
@@ -165,7 +165,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
165
165
|
onClick: c[2] || (c[2] = (l) => g("delete", x.bundle)),
|
|
166
166
|
icon: "delete"
|
|
167
167
|
}, {
|
|
168
|
-
label:
|
|
168
|
+
label: B(() => [...c[3] || (c[3] = [
|
|
169
169
|
V("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
170
170
|
])]),
|
|
171
171
|
_: 1
|
|
@@ -178,7 +178,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
178
178
|
V("div", Ct, K(x.bundle.name), 1),
|
|
179
179
|
V("div", _t, K(e(s) || "Free"), 1),
|
|
180
180
|
V("div", St, [
|
|
181
|
-
(h(!0), D(Y, null,
|
|
181
|
+
(h(!0), D(Y, null, ce(e(v), (l, w) => (h(), M(t, {
|
|
182
182
|
key: w,
|
|
183
183
|
label: l
|
|
184
184
|
}, null, 8, ["label"]))), 128))
|
|
@@ -192,14 +192,14 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
192
192
|
__name: "AddBundleCard",
|
|
193
193
|
emits: ["create"],
|
|
194
194
|
setup(x, { emit: S }) {
|
|
195
|
-
const { t: a } =
|
|
195
|
+
const { t: a } = xe(), g = S;
|
|
196
196
|
return (s, v) => {
|
|
197
197
|
const o = _("FmButton"), c = _("FmCard");
|
|
198
198
|
return h(), M(c, {
|
|
199
199
|
variant: "outlined",
|
|
200
200
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
202
|
+
default: B(() => [
|
|
203
203
|
r(o, {
|
|
204
204
|
onClick: v[0] || (v[0] = (i) => g("create")),
|
|
205
205
|
label: e(a)("connect.store.actions.addBundle"),
|
|
@@ -224,7 +224,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
setup(x) {
|
|
227
|
-
const { t: S } =
|
|
227
|
+
const { t: S } = xe(), a = x, g = Ee(), { emitData: s, emitAction: v } = je(), o = N(a.initialValue), c = ee.string().min(1);
|
|
228
228
|
function i() {
|
|
229
229
|
s(o.value), v("primary"), g.close();
|
|
230
230
|
}
|
|
@@ -236,7 +236,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
236
236
|
return h(), D("div", wt, [
|
|
237
237
|
r(d, {
|
|
238
238
|
modelValue: e(o),
|
|
239
|
-
"onUpdate:modelValue": f[0] || (f[0] = (l) =>
|
|
239
|
+
"onUpdate:modelValue": f[0] || (f[0] = (l) => re(o) ? o.value = l : null),
|
|
240
240
|
label: e(S)("connect.store.category.label"),
|
|
241
241
|
rules: [e(Q).toRule(e(c))]
|
|
242
242
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
@@ -265,10 +265,10 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
265
265
|
]);
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}), $t = { class: "space-y-16" },
|
|
268
|
+
}), $t = { class: "space-y-16" }, Ut = { class: "flex items-center justify-end gap-8 pb-16" }, Rt = /* @__PURE__ */ te({
|
|
269
269
|
__name: "SelectCategoryDialog",
|
|
270
270
|
setup(x) {
|
|
271
|
-
const { emitData: S, emitAction: a } = je(), g = Te(), s =
|
|
271
|
+
const { emitData: S, emitAction: a } = je(), g = Te(), s = N(), v = L(
|
|
272
272
|
() => g.sortedStoreCategories.map((o, c) => ({
|
|
273
273
|
label: o.name,
|
|
274
274
|
value: c
|
|
@@ -283,12 +283,12 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
283
283
|
items: e(v),
|
|
284
284
|
modelValue: e(s),
|
|
285
285
|
"onUpdate:modelValue": [
|
|
286
|
-
c[0] || (c[0] = (u) =>
|
|
286
|
+
c[0] || (c[0] = (u) => re(s) ? s.value = u : null),
|
|
287
287
|
c[1] || (c[1] = (u) => e(S)(u))
|
|
288
288
|
],
|
|
289
289
|
label: "Category"
|
|
290
290
|
}, null, 8, ["items", "modelValue"]),
|
|
291
|
-
V("div",
|
|
291
|
+
V("div", Ut, [
|
|
292
292
|
r(t, {
|
|
293
293
|
variant: "tertiary",
|
|
294
294
|
label: "Cancel",
|
|
@@ -304,11 +304,11 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
function
|
|
307
|
+
function se(x) {
|
|
308
308
|
return x.states.map((S) => ({ label: S, value: S }));
|
|
309
309
|
}
|
|
310
|
-
const
|
|
311
|
-
[
|
|
310
|
+
const It = {
|
|
311
|
+
[_e.F_COUNTRY.enum.MY]: {
|
|
312
312
|
states: [
|
|
313
313
|
"Johor",
|
|
314
314
|
"Kedah",
|
|
@@ -328,16 +328,46 @@ const Bt = {
|
|
|
328
328
|
"Terengganu"
|
|
329
329
|
],
|
|
330
330
|
get stateItems() {
|
|
331
|
-
return
|
|
331
|
+
return se(this);
|
|
332
332
|
}
|
|
333
333
|
},
|
|
334
|
-
[
|
|
334
|
+
[_e.F_COUNTRY.enum.SG]: {
|
|
335
335
|
states: [],
|
|
336
336
|
get stateItems() {
|
|
337
|
-
return
|
|
337
|
+
return se(this);
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
|
-
|
|
340
|
+
JP: {
|
|
341
|
+
states: [],
|
|
342
|
+
get stateItems() {
|
|
343
|
+
return se(this);
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
AE: {
|
|
347
|
+
states: [],
|
|
348
|
+
get stateItems() {
|
|
349
|
+
return se(this);
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
AU: {
|
|
353
|
+
states: [],
|
|
354
|
+
get stateItems() {
|
|
355
|
+
return se(this);
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
MO: {
|
|
359
|
+
states: [],
|
|
360
|
+
get stateItems() {
|
|
361
|
+
return se(this);
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
VN: {
|
|
365
|
+
states: [],
|
|
366
|
+
get stateItems() {
|
|
367
|
+
return se(this);
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
[_e.F_COUNTRY.enum.ID]: {
|
|
341
371
|
states: [
|
|
342
372
|
"Aceh",
|
|
343
373
|
"Bali",
|
|
@@ -374,10 +404,10 @@ const Bt = {
|
|
|
374
404
|
"West Sumatra"
|
|
375
405
|
],
|
|
376
406
|
get stateItems() {
|
|
377
|
-
return
|
|
407
|
+
return se(this);
|
|
378
408
|
}
|
|
379
409
|
},
|
|
380
|
-
[
|
|
410
|
+
[_e.F_COUNTRY.enum.TH]: {
|
|
381
411
|
states: [
|
|
382
412
|
"Bangkok",
|
|
383
413
|
"Amnat Charoen",
|
|
@@ -458,43 +488,43 @@ const Bt = {
|
|
|
458
488
|
"Yasothon"
|
|
459
489
|
],
|
|
460
490
|
get stateItems() {
|
|
461
|
-
return
|
|
491
|
+
return se(this);
|
|
462
492
|
}
|
|
463
493
|
}
|
|
464
|
-
},
|
|
494
|
+
}, ye = () => A.Config.getCountry(), ve = {
|
|
465
495
|
get fullCurrency() {
|
|
466
|
-
return
|
|
496
|
+
return ye().currency;
|
|
467
497
|
},
|
|
468
498
|
get currency() {
|
|
469
|
-
return
|
|
499
|
+
return ye().currency.code;
|
|
470
500
|
},
|
|
471
501
|
get fullTax() {
|
|
472
|
-
return A.Country.getCountryFlattenTaxes(
|
|
502
|
+
return A.Country.getCountryFlattenTaxes(ye().code);
|
|
473
503
|
},
|
|
474
504
|
get taxSystem() {
|
|
475
|
-
return
|
|
505
|
+
return ye().taxSystems;
|
|
476
506
|
},
|
|
477
507
|
taxInclusion(x) {
|
|
478
|
-
return
|
|
508
|
+
return ve.taxSystem.map((S) => ({
|
|
479
509
|
systemCode: S.code,
|
|
480
510
|
inclusive: x !== void 0 ? x : !1
|
|
481
511
|
}));
|
|
482
512
|
},
|
|
483
513
|
groupedTaxOptions() {
|
|
484
|
-
const x = A.Country.getCountryFlattenTaxes(
|
|
485
|
-
return
|
|
514
|
+
const x = A.Country.getCountryFlattenTaxes(ye().code);
|
|
515
|
+
return ve.taxSystem.map((S) => ({
|
|
486
516
|
code: S.code,
|
|
487
|
-
options: x.map((a) => ({ ...a, feedmeTaxCode:
|
|
517
|
+
options: x.map((a) => ({ ...a, feedmeTaxCode: ve.generateCode(a) })).filter((a) => a.systemCode === S.code)
|
|
488
518
|
}));
|
|
489
519
|
},
|
|
490
520
|
systemDefaultCode(x) {
|
|
491
|
-
const S =
|
|
521
|
+
const S = ve.groupedTaxOptions().find((a) => a.code === x);
|
|
492
522
|
return S == null ? void 0 : S.options.find((a) => a.default);
|
|
493
523
|
},
|
|
494
524
|
generateCode(x) {
|
|
495
525
|
return `${x.systemCode}/${x.taxCode}`;
|
|
496
526
|
}
|
|
497
|
-
}, W =
|
|
527
|
+
}, W = ve, Bt = /* @__PURE__ */ te({
|
|
498
528
|
__name: "TaxInclusiveSetting",
|
|
499
529
|
props: {
|
|
500
530
|
modelValue: {
|
|
@@ -505,7 +535,7 @@ const Bt = {
|
|
|
505
535
|
},
|
|
506
536
|
emits: ["update:model-value"],
|
|
507
537
|
setup(x, { emit: S }) {
|
|
508
|
-
const a = x, g = W.taxSystem, s = S, v =
|
|
538
|
+
const a = x, g = W.taxSystem, s = S, v = N(a.modelValue);
|
|
509
539
|
function o(u, f) {
|
|
510
540
|
const d = ae.clone(a.modelValue), T = d.findIndex((l) => l.systemCode === u);
|
|
511
541
|
T >= 0 ? d[T].inclusive = f : d.push({
|
|
@@ -531,7 +561,7 @@ const Bt = {
|
|
|
531
561
|
function t(u, f) {
|
|
532
562
|
return `${u} ${f ? "Inclusive" : "Exclusive"}`;
|
|
533
563
|
}
|
|
534
|
-
return
|
|
564
|
+
return he(() => {
|
|
535
565
|
a.modelValue.length || o(g[0].code, !1);
|
|
536
566
|
}), Pe(
|
|
537
567
|
() => a.modelValue,
|
|
@@ -540,7 +570,7 @@ const Bt = {
|
|
|
540
570
|
}
|
|
541
571
|
), (u, f) => {
|
|
542
572
|
const d = _("FmSwitch");
|
|
543
|
-
return h(!0), D(Y, null,
|
|
573
|
+
return h(!0), D(Y, null, ce(e(i), (T, l) => {
|
|
544
574
|
var w;
|
|
545
575
|
return h(), D("div", { key: l }, [
|
|
546
576
|
r(d, {
|
|
@@ -548,7 +578,7 @@ const Bt = {
|
|
|
548
578
|
"label-placement": "left",
|
|
549
579
|
"onUpdate:modelValue": ($) => T.input($)
|
|
550
580
|
}, {
|
|
551
|
-
label:
|
|
581
|
+
label: B(() => {
|
|
552
582
|
var $;
|
|
553
583
|
return [
|
|
554
584
|
V("div", null, K(t(T.label, (($ = e(v)[l]) == null ? void 0 : $.inclusive) || !1)), 1)
|
|
@@ -561,7 +591,7 @@ const Bt = {
|
|
|
561
591
|
};
|
|
562
592
|
}
|
|
563
593
|
});
|
|
564
|
-
var
|
|
594
|
+
var Nt = { mode: "production", appMode: "mf" };
|
|
565
595
|
const Dt = { class: "space-y-8" }, Mt = {
|
|
566
596
|
key: 0,
|
|
567
597
|
class: "space-y-16"
|
|
@@ -572,7 +602,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
572
602
|
},
|
|
573
603
|
emits: ["update:modelValue"],
|
|
574
604
|
setup(x, { emit: S }) {
|
|
575
|
-
const a = x, g = S, s =
|
|
605
|
+
const a = x, g = S, s = N(!1);
|
|
576
606
|
Pe(s, (o, c) => {
|
|
577
607
|
c != o && (!a.modelValue && o ? g("update:modelValue", {
|
|
578
608
|
apiKey: "",
|
|
@@ -580,17 +610,17 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
580
610
|
}) : o || g("update:modelValue", void 0));
|
|
581
611
|
});
|
|
582
612
|
const v = L(() => {
|
|
583
|
-
const o =
|
|
613
|
+
const o = Nt.mode === "development", c = A.Config.getCountry().code.toLowerCase(), i = c != "my" ? `.${c}` : "";
|
|
584
614
|
return `https://marketing${o ? "-dev" : ""}${i}.feedmeapi.com/stripe/${Ze.getBusinessId()}/webhook`;
|
|
585
615
|
});
|
|
586
|
-
return
|
|
616
|
+
return he(() => {
|
|
587
617
|
s.value = !!a.modelValue;
|
|
588
618
|
}), (o, c) => {
|
|
589
619
|
const i = _("FmSwitch"), t = _("FmTextField"), u = _("FmButton");
|
|
590
620
|
return h(), D("div", Dt, [
|
|
591
621
|
r(i, {
|
|
592
622
|
modelValue: e(s),
|
|
593
|
-
"onUpdate:modelValue": c[0] || (c[0] = (f) =>
|
|
623
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => re(s) ? s.value = f : null),
|
|
594
624
|
value: "true",
|
|
595
625
|
label: "Enable Stripe"
|
|
596
626
|
}, null, 8, ["modelValue"]),
|
|
@@ -607,7 +637,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
607
637
|
readonly: "",
|
|
608
638
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
609
639
|
}, {
|
|
610
|
-
append:
|
|
640
|
+
append: B(() => [
|
|
611
641
|
r(u, {
|
|
612
642
|
icon: "content_copy",
|
|
613
643
|
variant: "tertiary",
|
|
@@ -637,7 +667,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
637
667
|
__name: "StoreSettingSheet",
|
|
638
668
|
emits: ["update"],
|
|
639
669
|
setup(x, { expose: S, emit: a }) {
|
|
640
|
-
const { t: g } =
|
|
670
|
+
const { t: g } = xe(), s = a, v = N(!1), o = N(), c = N(!1), i = Qe.extend({
|
|
641
671
|
company: et.extend({
|
|
642
672
|
name: ee.string().min(1, "Company name is required"),
|
|
643
673
|
regNo: ee.string().min(1, "Registration number is required"),
|
|
@@ -687,10 +717,10 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
687
717
|
return h(), M(H, {
|
|
688
718
|
"max-width": 560,
|
|
689
719
|
modelValue: e(v),
|
|
690
|
-
"onUpdate:modelValue": l[15] || (l[15] = (z) =>
|
|
720
|
+
"onUpdate:modelValue": l[15] || (l[15] = (z) => re(v) ? v.value = z : null),
|
|
691
721
|
header: e(g)("connect.store.setting.title")
|
|
692
722
|
}, {
|
|
693
|
-
"side-sheet-footer":
|
|
723
|
+
"side-sheet-footer": B(() => [
|
|
694
724
|
V("div", Jt, [
|
|
695
725
|
r(Z, {
|
|
696
726
|
label: e(g)("connect.common.save"),
|
|
@@ -705,7 +735,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
705
735
|
}, null, 8, ["label"])
|
|
706
736
|
])
|
|
707
737
|
]),
|
|
708
|
-
default:
|
|
738
|
+
default: B(() => {
|
|
709
739
|
var z, oe;
|
|
710
740
|
return [
|
|
711
741
|
r(ke, { json: e(o) }, null, 8, ["json"]),
|
|
@@ -735,7 +765,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
735
765
|
}, null, 8, ["modelValue", "label", "schema"])) : E("", !0),
|
|
736
766
|
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (h(), D("div", jt, [
|
|
737
767
|
V("div", Lt, K(e(g)("connect.store.setting.company.tax")), 1),
|
|
738
|
-
r(
|
|
768
|
+
r(Bt, {
|
|
739
769
|
modelValue: e(o).inclusiveTaxes,
|
|
740
770
|
"onUpdate:modelValue": l[4] || (l[4] = (F) => e(o).inclusiveTaxes = F)
|
|
741
771
|
}, null, 8, ["modelValue"])
|
|
@@ -778,14 +808,14 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
778
808
|
placement: "top-end",
|
|
779
809
|
"model-value": e(c)
|
|
780
810
|
}, {
|
|
781
|
-
"menu-button":
|
|
811
|
+
"menu-button": B(() => [
|
|
782
812
|
r(le, {
|
|
783
813
|
modelValue: e(o).company.address.state,
|
|
784
814
|
"onUpdate:modelValue": l[10] || (l[10] = (F) => e(o).company.address.state = F),
|
|
785
815
|
schema: e(Q).typeAtPath(e(i), "company.address.state"),
|
|
786
816
|
onFocusChanged: l[11] || (l[11] = (F) => c.value = F)
|
|
787
817
|
}, {
|
|
788
|
-
append:
|
|
818
|
+
append: B(() => [
|
|
789
819
|
r(w, {
|
|
790
820
|
name: e(c) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
791
821
|
}, null, 8, ["name"])
|
|
@@ -793,11 +823,11 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
793
823
|
_: 1
|
|
794
824
|
}, 8, ["modelValue", "schema"])
|
|
795
825
|
]),
|
|
796
|
-
default:
|
|
797
|
-
(h(!0), D(Y, null,
|
|
826
|
+
default: B(() => [
|
|
827
|
+
(h(!0), D(Y, null, ce(e(It)[e(A.Config).getCountry().code].stateItems.filter(
|
|
798
828
|
(F) => {
|
|
799
|
-
var
|
|
800
|
-
return F.label.toLowerCase().includes(((b = (
|
|
829
|
+
var ie, b;
|
|
830
|
+
return F.label.toLowerCase().includes(((b = (ie = e(o)) == null ? void 0 : ie.company) == null ? void 0 : b.address.state.toLowerCase()) ?? "");
|
|
801
831
|
}
|
|
802
832
|
) || [], (F) => (h(), M($, {
|
|
803
833
|
key: F.value,
|
|
@@ -854,7 +884,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
854
884
|
emits: ["update:modelValue"],
|
|
855
885
|
setup(x, { emit: S }) {
|
|
856
886
|
const a = x, g = S;
|
|
857
|
-
|
|
887
|
+
he(() => {
|
|
858
888
|
if (o.value.length !== v.value.length) {
|
|
859
889
|
const t = v.value.reduce((u, f) => {
|
|
860
890
|
const d = W.systemDefaultCode(f.name);
|
|
@@ -899,7 +929,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
899
929
|
}
|
|
900
930
|
return (t, u) => {
|
|
901
931
|
const f = _("FmRadio"), d = _("FmRadioGroup");
|
|
902
|
-
return h(!0), D(Y, null,
|
|
932
|
+
return h(!0), D(Y, null, ce(e(v), (T) => (h(), D("div", {
|
|
903
933
|
key: T.name,
|
|
904
934
|
class: "flex items-start"
|
|
905
935
|
}, [
|
|
@@ -912,8 +942,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
912
942
|
})
|
|
913
943
|
]
|
|
914
944
|
}, {
|
|
915
|
-
default:
|
|
916
|
-
(h(!0), D(Y, null,
|
|
945
|
+
default: B(() => [
|
|
946
|
+
(h(!0), D(Y, null, ce(T.options, (l, w) => (h(), M(f, {
|
|
917
947
|
key: w,
|
|
918
948
|
value: l.value,
|
|
919
949
|
label: l.label
|
|
@@ -954,11 +984,11 @@ const Zt = /* @__PURE__ */ te({
|
|
|
954
984
|
__name: "EditBundleSheet",
|
|
955
985
|
emits: ["update"],
|
|
956
986
|
setup(x, { expose: S, emit: a }) {
|
|
957
|
-
const g = a, { t: s } =
|
|
987
|
+
const g = a, { t: s } = xe(), v = Te(), o = N(!1), c = N([]), i = N({
|
|
958
988
|
category: 0,
|
|
959
989
|
index: -1,
|
|
960
990
|
originalCategoryIndex: void 0
|
|
961
|
-
}), t =
|
|
991
|
+
}), t = N(ae.cloneDeep(we)), u = N(), f = Ae, d = L(() => {
|
|
962
992
|
const m = f.safeParse(t.value);
|
|
963
993
|
return m.success ? [] : m.error.errors;
|
|
964
994
|
}), T = [
|
|
@@ -972,7 +1002,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
972
1002
|
header: "Reward type",
|
|
973
1003
|
accessorFn: (m) => m.collectible.type,
|
|
974
1004
|
cell(m) {
|
|
975
|
-
return
|
|
1005
|
+
return fe[m.row.original.collectible.type].chip();
|
|
976
1006
|
}
|
|
977
1007
|
},
|
|
978
1008
|
{
|
|
@@ -984,7 +1014,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
984
1014
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : Je(Xe.FmStepperField, {
|
|
985
1015
|
"onUpdate:modelValue": (y) => {
|
|
986
1016
|
t.value.titles = t.value.titles.map(
|
|
987
|
-
(
|
|
1017
|
+
(R) => R.id == n.collectible._id ? { ...R, dayToExpire: y } : R
|
|
988
1018
|
);
|
|
989
1019
|
},
|
|
990
1020
|
modelValue: ((p = n.selectedReward) == null ? void 0 : p.extra) ?? 0,
|
|
@@ -998,19 +1028,19 @@ const Zt = /* @__PURE__ */ te({
|
|
|
998
1028
|
});
|
|
999
1029
|
}
|
|
1000
1030
|
}
|
|
1001
|
-
], l =
|
|
1031
|
+
], l = N([]), w = L(() => {
|
|
1002
1032
|
var n;
|
|
1003
1033
|
const m = (n = t.value) != null && n.isFeedvibe ? "STORE_BUNDLE:FEEDVIBE" : "STORE_BUNDLE:DEFAULT";
|
|
1004
1034
|
return v.bundleRewards.filter((p) => {
|
|
1005
1035
|
var y;
|
|
1006
1036
|
return (y = t.value) != null && y.isFeedvibe && p.type !== "VOUCHER" ? !1 : pt(p.capabilities, m);
|
|
1007
1037
|
}).map((p) => {
|
|
1008
|
-
const y = $.value.find((O) => O.id == p._id),
|
|
1038
|
+
const y = $.value.find((O) => O.id == p._id), R = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${ft(
|
|
1009
1039
|
p.options.validityOption || {}
|
|
1010
1040
|
)}` : "No expiry";
|
|
1011
1041
|
return {
|
|
1012
1042
|
collectible: p,
|
|
1013
|
-
description:
|
|
1043
|
+
description: R,
|
|
1014
1044
|
selectedReward: y
|
|
1015
1045
|
};
|
|
1016
1046
|
});
|
|
@@ -1041,18 +1071,18 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1041
1071
|
for (let p = 0; p < m.length; p++) {
|
|
1042
1072
|
const y = m[p];
|
|
1043
1073
|
H.value[p] ? y.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1044
|
-
(
|
|
1074
|
+
(U) => U.id == y.collectible._id
|
|
1045
1075
|
) < 0 && n.titles.push({
|
|
1046
1076
|
id: y.collectible._id,
|
|
1047
1077
|
dayToExpire: j.value
|
|
1048
1078
|
}) : n.vouchers.findIndex(
|
|
1049
|
-
(
|
|
1079
|
+
(U) => U == y.collectible._id
|
|
1050
1080
|
) < 0 && n.vouchers.push(y.collectible._id) : (n.titles = n.titles.filter((O) => O.id != y.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1051
1081
|
(O) => O != y.collectible._id
|
|
1052
1082
|
));
|
|
1053
1083
|
}
|
|
1054
1084
|
}
|
|
1055
|
-
const H =
|
|
1085
|
+
const H = N({});
|
|
1056
1086
|
Pe(H, Z, { deep: !0 });
|
|
1057
1087
|
const z = L(() => {
|
|
1058
1088
|
var m, n;
|
|
@@ -1070,7 +1100,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1070
1100
|
((m = v.storeOption) == null ? void 0 : m.inclusiveTaxes) ?? [],
|
|
1071
1101
|
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((y) => y.code) : []
|
|
1072
1102
|
);
|
|
1073
|
-
}),
|
|
1103
|
+
}), ie = L(() => F.value.reduce(
|
|
1074
1104
|
(n, p) => n.add(p.total),
|
|
1075
1105
|
ct()
|
|
1076
1106
|
).toFormat()), b = L(() => {
|
|
@@ -1090,44 +1120,44 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1090
1120
|
function C() {
|
|
1091
1121
|
return ae.cloneDeep(we);
|
|
1092
1122
|
}
|
|
1093
|
-
function
|
|
1094
|
-
o.value = m, m && n && (u.value = void 0, c.value = n.categories, t.value = n.bundle || C(), i.value.category = n.category, i.value.index = n.index, i.value.originalCategoryIndex = n.category, H.value = w.value.reduce((p, y,
|
|
1123
|
+
function I(m, n) {
|
|
1124
|
+
o.value = m, m && n && (u.value = void 0, c.value = n.categories, t.value = n.bundle || C(), i.value.category = n.category, i.value.index = n.index, i.value.originalCategoryIndex = n.category, H.value = w.value.reduce((p, y, R) => (p[R] = !!y.selectedReward, p), {}));
|
|
1095
1125
|
}
|
|
1096
1126
|
return S({
|
|
1097
|
-
showSheet:
|
|
1127
|
+
showSheet: I,
|
|
1098
1128
|
bundleImage: u,
|
|
1099
1129
|
target: i,
|
|
1100
1130
|
data: t
|
|
1101
1131
|
}), (m, n) => {
|
|
1102
|
-
const p = _("FmSwitch"), y = _("FmHelperText"),
|
|
1103
|
-
return h(), M(
|
|
1132
|
+
const p = _("FmSwitch"), y = _("FmHelperText"), R = _("FmTextField"), O = _("FmSelect"), U = _("FmStepperField"), q = _("FmMenuItem"), J = _("FmTable"), pe = _("FmButton"), Ce = _("FmSideSheet");
|
|
1133
|
+
return h(), M(Ce, {
|
|
1104
1134
|
"max-width": 768,
|
|
1105
1135
|
modelValue: e(o),
|
|
1106
|
-
"onUpdate:modelValue": n[21] || (n[21] = (
|
|
1136
|
+
"onUpdate:modelValue": n[21] || (n[21] = (de) => re(o) ? o.value = de : null),
|
|
1107
1137
|
header: e(i).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1108
1138
|
}, {
|
|
1109
|
-
"side-sheet-footer":
|
|
1139
|
+
"side-sheet-footer": B(() => [
|
|
1110
1140
|
V("div", cn, [
|
|
1111
|
-
r(
|
|
1141
|
+
r(pe, {
|
|
1112
1142
|
label: e(i).index != -1 ? "Save" : "Add",
|
|
1113
1143
|
onClick: k,
|
|
1114
1144
|
disabled: e(d).length > 0,
|
|
1115
1145
|
loading: e(Se)().isLoading
|
|
1116
1146
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1117
|
-
r(
|
|
1147
|
+
r(pe, {
|
|
1118
1148
|
label: "Cancel",
|
|
1119
|
-
onClick: n[20] || (n[20] = (
|
|
1149
|
+
onClick: n[20] || (n[20] = (de) => I(!1)),
|
|
1120
1150
|
variant: "tertiary"
|
|
1121
1151
|
})
|
|
1122
1152
|
])
|
|
1123
1153
|
]),
|
|
1124
|
-
default:
|
|
1125
|
-
var
|
|
1154
|
+
default: B(() => {
|
|
1155
|
+
var de, $e, Ue, Re, Ie, Be, Ne, De, Me, Oe;
|
|
1126
1156
|
return [
|
|
1127
1157
|
r(ke, { json: e(t) }, null, 8, ["json"]),
|
|
1128
1158
|
e(t) ? (h(), D("div", Qt, [
|
|
1129
1159
|
V("div", en, [
|
|
1130
|
-
e(A.Config).getCountry().code == "MY" && ((
|
|
1160
|
+
e(A.Config).getCountry().code == "MY" && ((de = e(v).payoutAccount) == null ? void 0 : de.status) == "APPROVED" && (($e = e(v).payoutAccount) != null && $e.enable) ? (h(), M(p, {
|
|
1131
1161
|
key: 0,
|
|
1132
1162
|
"onUpdate:modelValue": n[0] || (n[0] = (P) => {
|
|
1133
1163
|
e(t).isFeedvibe = P, e(t).isFeedvibe && (e(t).credit.normal = 0, e(t).coinPrice = 0, e(t).titles = [], H.value = {}, e(t).hideInPos = !0, e(t).internal = !0);
|
|
@@ -1144,7 +1174,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1144
1174
|
})) : E("", !0)
|
|
1145
1175
|
]),
|
|
1146
1176
|
V("div", tn, K(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1147
|
-
r(
|
|
1177
|
+
r(R, {
|
|
1148
1178
|
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1149
1179
|
modelValue: e(t).name,
|
|
1150
1180
|
"onUpdate:modelValue": n[1] || (n[1] = (P) => e(t).name = P),
|
|
@@ -1169,7 +1199,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1169
1199
|
"helper-state": e(G)(e(d), "image"),
|
|
1170
1200
|
"helper-text": e(X)(e(d), "image")
|
|
1171
1201
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1172
|
-
r(
|
|
1202
|
+
r(U, {
|
|
1173
1203
|
"model-value": e(A.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1174
1204
|
label: e(s)("connect.store.bundle.edit.bundlePrice"),
|
|
1175
1205
|
min: 0,
|
|
@@ -1184,12 +1214,12 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1184
1214
|
)} = ${e(A.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1185
1215
|
"helper-state": e(G)(e(d), "price")
|
|
1186
1216
|
}, {
|
|
1187
|
-
prepend:
|
|
1188
|
-
|
|
1217
|
+
prepend: B(() => [
|
|
1218
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1189
1219
|
]),
|
|
1190
1220
|
_: 1
|
|
1191
1221
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1192
|
-
r(
|
|
1222
|
+
r(U, {
|
|
1193
1223
|
"model-value": e(A.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1194
1224
|
label: e(s)("connect.store.bundle.edit.bundleValue"),
|
|
1195
1225
|
min: 0,
|
|
@@ -1202,12 +1232,12 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1202
1232
|
"helper-text": e(X)(e(d), "originalPrice") || e(s)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1203
1233
|
"helper-state": e(G)(e(d), "originalPrice")
|
|
1204
1234
|
}, {
|
|
1205
|
-
prepend:
|
|
1206
|
-
|
|
1235
|
+
prepend: B(() => [
|
|
1236
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1207
1237
|
]),
|
|
1208
1238
|
_: 1
|
|
1209
1239
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1210
|
-
e(t).isFeedvibe ? E("", !0) : (h(), M(
|
|
1240
|
+
e(t).isFeedvibe ? E("", !0) : (h(), M(U, {
|
|
1211
1241
|
key: 0,
|
|
1212
1242
|
"model-value": e(t).coinPrice ?? null,
|
|
1213
1243
|
label: e(s)("connect.store.bundle.edit.pointNeeded"),
|
|
@@ -1219,21 +1249,21 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1219
1249
|
"helper-state": e(G)(e(d), "coinPrice"),
|
|
1220
1250
|
"helper-text": e(X)(e(d), "coinPrice")
|
|
1221
1251
|
}, {
|
|
1222
|
-
append:
|
|
1223
|
-
|
|
1252
|
+
append: B(() => [...n[22] || (n[22] = [
|
|
1253
|
+
me(" point(s) ", -1)
|
|
1224
1254
|
])]),
|
|
1225
1255
|
_: 1
|
|
1226
1256
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1227
|
-
(
|
|
1257
|
+
(Ue = e(v).storeOption) != null && Ue.stripe && !e(t).isFeedvibe ? (h(), D(Y, { key: 1 }, [
|
|
1228
1258
|
V("div", nn, K(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1229
|
-
r(
|
|
1259
|
+
r(R, {
|
|
1230
1260
|
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1231
1261
|
modelValue: e(t).stripePriceId,
|
|
1232
1262
|
"onUpdate:modelValue": n[7] || (n[7] = (P) => e(t).stripePriceId = P),
|
|
1233
1263
|
"helper-state": e(G)(e(d), "stripePriceId"),
|
|
1234
1264
|
"helper-text": e(X)(e(d), "stripePriceId")
|
|
1235
1265
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1236
|
-
e(t).stripePriceId ? (h(), M(
|
|
1266
|
+
e(t).stripePriceId ? (h(), M(U, {
|
|
1237
1267
|
key: 0,
|
|
1238
1268
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1239
1269
|
min: 1,
|
|
@@ -1246,7 +1276,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1246
1276
|
], 64)) : E("", !0),
|
|
1247
1277
|
e(t).isFeedvibe ? E("", !0) : (h(), D(Y, { key: 2 }, [
|
|
1248
1278
|
V("div", on, K(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1249
|
-
r(
|
|
1279
|
+
r(U, {
|
|
1250
1280
|
modelValue: e(t).credit.normal,
|
|
1251
1281
|
"onUpdate:modelValue": n[8] || (n[8] = (P) => e(t).credit.normal = P),
|
|
1252
1282
|
label: e(s)("connect.store.bundle.edit.normalCredit"),
|
|
@@ -1254,13 +1284,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1254
1284
|
"helper-state": e(G)(e(d), "credit.normal"),
|
|
1255
1285
|
"helper-text": e(X)(e(d), "credit.normal")
|
|
1256
1286
|
}, {
|
|
1257
|
-
append:
|
|
1258
|
-
|
|
1287
|
+
append: B(() => [...n[23] || (n[23] = [
|
|
1288
|
+
me(" credit ", -1)
|
|
1259
1289
|
])]),
|
|
1260
1290
|
_: 1
|
|
1261
1291
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1262
|
-
r(
|
|
1263
|
-
"model-value": ((
|
|
1292
|
+
r(U, {
|
|
1293
|
+
"model-value": ((Re = e(t).credit.free) == null ? void 0 : Re.amount) ?? null,
|
|
1264
1294
|
min: 0,
|
|
1265
1295
|
"onUpdate:modelValue": n[9] || (n[9] = (P) => {
|
|
1266
1296
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1273,15 +1303,15 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1273
1303
|
"helper-state": e(G)(e(d), "credit.free.amount"),
|
|
1274
1304
|
"helper-text": e(X)(e(d), "credit.free.amount")
|
|
1275
1305
|
}, {
|
|
1276
|
-
append:
|
|
1277
|
-
|
|
1306
|
+
append: B(() => [...n[24] || (n[24] = [
|
|
1307
|
+
me(" credit ", -1)
|
|
1278
1308
|
])]),
|
|
1279
1309
|
_: 1
|
|
1280
1310
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1281
|
-
(
|
|
1311
|
+
(Ie = e(t).credit.free) != null && Ie.amount ? (h(), M(U, {
|
|
1282
1312
|
key: 0,
|
|
1283
1313
|
disabled: !!e(t).stripePriceId,
|
|
1284
|
-
"model-value": ((
|
|
1314
|
+
"model-value": ((Be = e(t).credit.free) == null ? void 0 : Be.day) ?? null,
|
|
1285
1315
|
min: 0,
|
|
1286
1316
|
"onUpdate:modelValue": n[10] || (n[10] = (P) => {
|
|
1287
1317
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1294,8 +1324,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1294
1324
|
"helper-state": e(G)(e(d), "credit.free.day"),
|
|
1295
1325
|
"helper-text": e(X)(e(d), "credit.free.day")
|
|
1296
1326
|
}, {
|
|
1297
|
-
append:
|
|
1298
|
-
|
|
1327
|
+
append: B(() => [...n[25] || (n[25] = [
|
|
1328
|
+
me(" day(s) ", -1)
|
|
1299
1329
|
])]),
|
|
1300
1330
|
_: 1
|
|
1301
1331
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : E("", !0)
|
|
@@ -1306,13 +1336,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1306
1336
|
modelValue: e(t).taxes,
|
|
1307
1337
|
"onUpdate:modelValue": n[11] || (n[11] = (P) => e(t).taxes = P)
|
|
1308
1338
|
}, null, 8, ["modelValue"]),
|
|
1309
|
-
r(
|
|
1339
|
+
r(R, {
|
|
1310
1340
|
label: `Tax Charged (${e(oe)})`,
|
|
1311
|
-
"model-value": e(
|
|
1341
|
+
"model-value": e(ie),
|
|
1312
1342
|
disabled: ""
|
|
1313
1343
|
}, null, 8, ["label", "model-value"])
|
|
1314
1344
|
], 64)) : E("", !0),
|
|
1315
|
-
r(
|
|
1345
|
+
r(U, {
|
|
1316
1346
|
label: "Total Price",
|
|
1317
1347
|
"model-value": e(b),
|
|
1318
1348
|
disabled: !0
|
|
@@ -1324,7 +1354,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1324
1354
|
r(dt, {
|
|
1325
1355
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1326
1356
|
}, {
|
|
1327
|
-
default:
|
|
1357
|
+
default: B(() => [
|
|
1328
1358
|
r(q, {
|
|
1329
1359
|
onClick: n[12] || (n[12] = (P) => l.value = []),
|
|
1330
1360
|
label: "All"
|
|
@@ -1334,20 +1364,20 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1334
1364
|
{
|
|
1335
1365
|
id: "type",
|
|
1336
1366
|
value: "VOUCHER",
|
|
1337
|
-
name: e(
|
|
1367
|
+
name: e(fe).VOUCHER.name
|
|
1338
1368
|
}
|
|
1339
1369
|
]),
|
|
1340
|
-
label: e(
|
|
1370
|
+
label: e(fe).VOUCHER.name
|
|
1341
1371
|
}, null, 8, ["label"]),
|
|
1342
1372
|
r(q, {
|
|
1343
1373
|
onClick: n[14] || (n[14] = (P) => l.value = [
|
|
1344
1374
|
{
|
|
1345
1375
|
id: "type",
|
|
1346
1376
|
value: "TITLE",
|
|
1347
|
-
name: e(
|
|
1377
|
+
name: e(fe).TITLE.name
|
|
1348
1378
|
}
|
|
1349
1379
|
]),
|
|
1350
|
-
label: e(
|
|
1380
|
+
label: e(fe).TITLE.name
|
|
1351
1381
|
}, null, 8, ["label"])
|
|
1352
1382
|
]),
|
|
1353
1383
|
_: 1
|
|
@@ -1355,7 +1385,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1355
1385
|
]),
|
|
1356
1386
|
r(J, {
|
|
1357
1387
|
modelValue: e(H),
|
|
1358
|
-
"onUpdate:modelValue": n[15] || (n[15] = (P) =>
|
|
1388
|
+
"onUpdate:modelValue": n[15] || (n[15] = (P) => re(H) ? H.value = P : null),
|
|
1359
1389
|
selection: "multiple",
|
|
1360
1390
|
"column-filter": e(l),
|
|
1361
1391
|
"column-defs": T,
|
|
@@ -1385,14 +1415,14 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1385
1415
|
sublabel: e(s)("connect.store.bundle.edit.hideInPosDescription")
|
|
1386
1416
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
1387
1417
|
], 64)),
|
|
1388
|
-
r(
|
|
1389
|
-
"model-value": ((De = (
|
|
1418
|
+
r(U, {
|
|
1419
|
+
"model-value": ((De = (Ne = e(t).config) == null ? void 0 : Ne.options) == null ? void 0 : De.maxPerUser) || null,
|
|
1390
1420
|
"onUpdate:modelValue": n[18] || (n[18] = (P) => e(ae).set(e(t), "config.options.maxPerUser", P)),
|
|
1391
1421
|
label: e(s)("connect.store.bundle.edit.maxPerUser"),
|
|
1392
1422
|
"show-steppers": !1,
|
|
1393
1423
|
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1394
1424
|
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
1395
|
-
r(
|
|
1425
|
+
r(U, {
|
|
1396
1426
|
"model-value": ((Oe = (Me = e(t).config) == null ? void 0 : Me.options) == null ? void 0 : Oe.maxReceive) || null,
|
|
1397
1427
|
"onUpdate:modelValue": n[19] || (n[19] = (P) => e(ae).set(e(t), "config.options.maxReceive", P)),
|
|
1398
1428
|
label: e(s)("connect.store.bundle.edit.maxReceive"),
|
|
@@ -1411,8 +1441,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1411
1441
|
__name: "SendBundleSheet",
|
|
1412
1442
|
emits: ["success"],
|
|
1413
1443
|
setup(x, { expose: S, emit: a }) {
|
|
1414
|
-
const { minor: g } = Le, s =
|
|
1415
|
-
|
|
1444
|
+
const { minor: g } = Le, s = N(), v = N(""), o = N(""), c = N([]), i = N(!1), t = N();
|
|
1445
|
+
N(!0);
|
|
1416
1446
|
function u(w) {
|
|
1417
1447
|
i.value = !0, v.value = null, o.value = "", s.value = w.bundle;
|
|
1418
1448
|
}
|
|
@@ -1437,7 +1467,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1437
1467
|
const w = c.value.find(
|
|
1438
1468
|
(j) => j.value === v.value
|
|
1439
1469
|
);
|
|
1440
|
-
await
|
|
1470
|
+
await be.confirm(
|
|
1441
1471
|
`Are you sure you want to send bundle ${s.value.name} to ${w == null ? void 0 : w.label}?`,
|
|
1442
1472
|
"Confirm",
|
|
1443
1473
|
"Confirm",
|
|
@@ -1451,7 +1481,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1451
1481
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1452
1482
|
withCoin: !1
|
|
1453
1483
|
};
|
|
1454
|
-
await
|
|
1484
|
+
await ge.sendBundle(j), f();
|
|
1455
1485
|
},
|
|
1456
1486
|
{
|
|
1457
1487
|
message: "Sending bundle",
|
|
@@ -1469,21 +1499,21 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1469
1499
|
return S({
|
|
1470
1500
|
showSheet: u,
|
|
1471
1501
|
hideSheet: f
|
|
1472
|
-
}),
|
|
1502
|
+
}), he(async () => {
|
|
1473
1503
|
await d("");
|
|
1474
1504
|
}), (w, $) => {
|
|
1475
|
-
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"),
|
|
1505
|
+
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"), ie = _("FmForm"), b = _("FmButton"), k = _("FmSideSheet");
|
|
1476
1506
|
return h(), M(k, {
|
|
1477
1507
|
"max-width": 560,
|
|
1478
1508
|
"dismiss-away": !0,
|
|
1479
1509
|
header: "Send bundle to member",
|
|
1480
1510
|
modelValue: e(i),
|
|
1481
1511
|
"onUpdate:modelValue": [
|
|
1482
|
-
$[4] || ($[4] = (C) =>
|
|
1512
|
+
$[4] || ($[4] = (C) => re(i) ? i.value = C : null),
|
|
1483
1513
|
$[5] || ($[5] = (C) => i.value = C)
|
|
1484
1514
|
]
|
|
1485
1515
|
}, {
|
|
1486
|
-
"side-sheet-footer":
|
|
1516
|
+
"side-sheet-footer": B(() => [
|
|
1487
1517
|
V("div", fn, [
|
|
1488
1518
|
r(b, {
|
|
1489
1519
|
label: "Send",
|
|
@@ -1501,30 +1531,30 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1501
1531
|
})
|
|
1502
1532
|
])
|
|
1503
1533
|
]),
|
|
1504
|
-
default:
|
|
1505
|
-
r(
|
|
1534
|
+
default: B(() => [
|
|
1535
|
+
r(ie, {
|
|
1506
1536
|
class: "space-y-16",
|
|
1507
1537
|
ref_key: "form",
|
|
1508
1538
|
ref: t,
|
|
1509
1539
|
onValidationSuccess: T,
|
|
1510
1540
|
blameFormChildOnValidationFailed: ""
|
|
1511
1541
|
}, {
|
|
1512
|
-
default:
|
|
1542
|
+
default: B(() => [
|
|
1513
1543
|
r(z, {
|
|
1514
1544
|
class: "max-w-[700px]",
|
|
1515
1545
|
horizontal: "",
|
|
1516
1546
|
variant: "outlined"
|
|
1517
1547
|
}, {
|
|
1518
|
-
default:
|
|
1519
|
-
var C,
|
|
1548
|
+
default: B(() => {
|
|
1549
|
+
var C, I;
|
|
1520
1550
|
return [
|
|
1521
1551
|
(C = e(s)) != null && C.image ? (h(), M(j, {
|
|
1522
1552
|
key: 0,
|
|
1523
1553
|
width: "100",
|
|
1524
|
-
src: (
|
|
1554
|
+
src: (I = e(s)) == null ? void 0 : I.image
|
|
1525
1555
|
}, null, 8, ["src"])) : E("", !0),
|
|
1526
1556
|
r(H, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1527
|
-
default:
|
|
1557
|
+
default: B(() => {
|
|
1528
1558
|
var m;
|
|
1529
1559
|
return [
|
|
1530
1560
|
r(ne, {
|
|
@@ -1533,8 +1563,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1533
1563
|
subtitle: e(l)
|
|
1534
1564
|
}, null, 8, ["title", "subtitle"]),
|
|
1535
1565
|
r(H, { class: "p-0" }, {
|
|
1536
|
-
default:
|
|
1537
|
-
var n, p, y,
|
|
1566
|
+
default: B(() => {
|
|
1567
|
+
var n, p, y, R, O, U, q, J, pe, Ce, de;
|
|
1538
1568
|
return [
|
|
1539
1569
|
V("div", pn, [
|
|
1540
1570
|
(n = e(s)) != null && n.isFeedvibe ? (h(), M(Z, {
|
|
@@ -1545,13 +1575,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1545
1575
|
key: 1,
|
|
1546
1576
|
label: `${e(s).titles.length} title(s)`
|
|
1547
1577
|
}, null, 8, ["label"])) : E("", !0),
|
|
1548
|
-
(O = (
|
|
1578
|
+
(O = (R = e(s)) == null ? void 0 : R.vouchers) != null && O.length ? (h(), M(Z, {
|
|
1549
1579
|
key: 2,
|
|
1550
1580
|
label: `${e(s).vouchers.length} voucher(s)`
|
|
1551
1581
|
}, null, 8, ["label"])) : E("", !0),
|
|
1552
|
-
(q = (
|
|
1582
|
+
(q = (U = e(s)) == null ? void 0 : U.credit) != null && q.normal || (Ce = (pe = (J = e(s)) == null ? void 0 : J.credit) == null ? void 0 : pe.free) != null && Ce.amount ? (h(), M(Z, {
|
|
1553
1583
|
key: 3,
|
|
1554
|
-
label: `${(e(s).credit.normal || 0) + (((
|
|
1584
|
+
label: `${(e(s).credit.normal || 0) + (((de = e(s).credit.free) == null ? void 0 : de.amount) || 0)} credit(s)`
|
|
1555
1585
|
}, null, 8, ["label"])) : E("", !0)
|
|
1556
1586
|
])
|
|
1557
1587
|
];
|
|
@@ -1568,7 +1598,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1568
1598
|
}),
|
|
1569
1599
|
r(oe, {
|
|
1570
1600
|
modelValue: e(v),
|
|
1571
|
-
"onUpdate:modelValue": $[0] || ($[0] = (C) =>
|
|
1601
|
+
"onUpdate:modelValue": $[0] || ($[0] = (C) => re(v) ? v.value = C : null),
|
|
1572
1602
|
label: "Select member",
|
|
1573
1603
|
searchable: "",
|
|
1574
1604
|
items: e(c),
|
|
@@ -1578,7 +1608,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1578
1608
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1579
1609
|
r(F, {
|
|
1580
1610
|
modelValue: e(o),
|
|
1581
|
-
"onUpdate:modelValue": $[1] || ($[1] = (C) =>
|
|
1611
|
+
"onUpdate:modelValue": $[1] || ($[1] = (C) => re(o) ? o.value = C : null),
|
|
1582
1612
|
label: "Reference (optional)",
|
|
1583
1613
|
rules: [
|
|
1584
1614
|
(C) => C.length < 50 || "Reference must be less than 50 characters"
|
|
@@ -1601,7 +1631,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1601
1631
|
label: "Setup payout account",
|
|
1602
1632
|
value: "payout",
|
|
1603
1633
|
isPrimary: !1
|
|
1604
|
-
}, { t: a } =
|
|
1634
|
+
}, { t: a } = xe(), g = {
|
|
1605
1635
|
label: a("connect.store.actions.setting"),
|
|
1606
1636
|
value: "setting",
|
|
1607
1637
|
isPrimary: !1
|
|
@@ -1613,73 +1643,73 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1613
1643
|
value: "create_category",
|
|
1614
1644
|
isPrimary: !0,
|
|
1615
1645
|
prependIcon: "add"
|
|
1616
|
-
}, o =
|
|
1646
|
+
}, o = N(), c = bt(), i = Te(), { global: t, minor: u } = Le, f = Ee(), d = L(() => i.sortedStoreCategories), T = L(() => i.sortedStoreCategories.map((b) => b.name)), l = N(), w = N();
|
|
1617
1647
|
async function $(b) {
|
|
1618
1648
|
var k;
|
|
1619
1649
|
b === "setting" ? (k = l.value) == null || k.showSheet(!0, i.storeOption) : b === "create_category" ? H(-1) : b === "create_reward" ? await c.push({ name: at["$connect-STORE_REWARDS"] }) : b == "payout" && window.open(bn.paymentPortalUrl, "_blank");
|
|
1620
1650
|
}
|
|
1621
1651
|
function j(b, k) {
|
|
1622
1652
|
var p;
|
|
1623
|
-
const C = !!((p = k.company) != null && p.sstRegNo),
|
|
1653
|
+
const C = !!((p = k.company) != null && p.sstRegNo), I = k.inclusiveTaxes ?? [], m = W.taxSystem.map((y) => y.code), n = C ? I.flatMap((y) => {
|
|
1624
1654
|
console.log(y, "inclusive tax");
|
|
1625
|
-
const
|
|
1626
|
-
return
|
|
1655
|
+
const R = W.systemDefaultCode(y.systemCode);
|
|
1656
|
+
return R ? [{ systemCode: y.systemCode, taxCode: R.taxCode }] : [];
|
|
1627
1657
|
}) : [];
|
|
1628
1658
|
return console.log([
|
|
1629
1659
|
["hasSstRegNo", C],
|
|
1630
1660
|
["defaultTaxCodes", n],
|
|
1631
|
-
["inclusiveTaxes",
|
|
1661
|
+
["inclusiveTaxes", I],
|
|
1632
1662
|
["taxSystemCodes", m]
|
|
1633
1663
|
]), b.map((y) => ({
|
|
1634
1664
|
...y,
|
|
1635
|
-
bundles: y.bundles.map((
|
|
1636
|
-
const { pf_vouchers: O, ...
|
|
1665
|
+
bundles: y.bundles.map((R) => {
|
|
1666
|
+
const { pf_vouchers: O, ...U } = R;
|
|
1637
1667
|
if (!C)
|
|
1638
1668
|
return {
|
|
1639
|
-
...
|
|
1669
|
+
...U,
|
|
1640
1670
|
taxes: [],
|
|
1641
1671
|
taxTotals: [],
|
|
1642
|
-
priceWithTaxes: { ...
|
|
1672
|
+
priceWithTaxes: { ...U.price }
|
|
1643
1673
|
};
|
|
1644
1674
|
const q = n, J = He(
|
|
1645
1675
|
W.fullTax,
|
|
1646
1676
|
q,
|
|
1647
|
-
|
|
1648
|
-
Number(
|
|
1649
|
-
|
|
1677
|
+
U.price,
|
|
1678
|
+
Number(U.credit.normal),
|
|
1679
|
+
I,
|
|
1650
1680
|
m
|
|
1651
1681
|
);
|
|
1652
1682
|
return {
|
|
1653
|
-
...
|
|
1683
|
+
...U,
|
|
1654
1684
|
taxes: q,
|
|
1655
1685
|
taxTotals: J,
|
|
1656
1686
|
priceWithTaxes: qe(
|
|
1657
1687
|
J,
|
|
1658
|
-
|
|
1659
|
-
|
|
1688
|
+
U.price,
|
|
1689
|
+
I
|
|
1660
1690
|
)
|
|
1661
1691
|
};
|
|
1662
1692
|
})
|
|
1663
1693
|
}));
|
|
1664
1694
|
}
|
|
1665
1695
|
async function ne(b, k, C) {
|
|
1666
|
-
const
|
|
1696
|
+
const I = !C && !!k, m = !!C && !k;
|
|
1667
1697
|
let n;
|
|
1668
|
-
if (
|
|
1669
|
-
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0,
|
|
1698
|
+
if (I) {
|
|
1699
|
+
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0, R = y ? `${y.name} (${y.taxCode})` : a("connect.store.taxPropagation.defaultTax");
|
|
1670
1700
|
n = a("connect.store.taxPropagation.addConfirm", {
|
|
1671
|
-
taxCode:
|
|
1701
|
+
taxCode: R
|
|
1672
1702
|
});
|
|
1673
1703
|
} else m ? n = a("connect.store.taxPropagation.removeConfirm") : n = a("connect.store.taxPropagation.updateConfirm");
|
|
1674
|
-
await
|
|
1704
|
+
await be.confirm(
|
|
1675
1705
|
n,
|
|
1676
1706
|
a("connect.store.taxPropagation.title"),
|
|
1677
1707
|
a("connect.store.taxPropagation.confirm"),
|
|
1678
1708
|
a("connect.common.cancel")
|
|
1679
1709
|
) && await u(
|
|
1680
1710
|
async () => {
|
|
1681
|
-
const y = Fe(i.sortedStoreCategories),
|
|
1682
|
-
await
|
|
1711
|
+
const y = Fe(i.sortedStoreCategories), R = j(y, b);
|
|
1712
|
+
await ge.updateStoreBundle({ categories: R }), await i.readMemberStore(), await i.readMembership(), await i.readRewards();
|
|
1683
1713
|
},
|
|
1684
1714
|
{
|
|
1685
1715
|
message: a("connect.store.taxPropagation.updating"),
|
|
@@ -1688,31 +1718,31 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1688
1718
|
);
|
|
1689
1719
|
}
|
|
1690
1720
|
async function Z(b) {
|
|
1691
|
-
var
|
|
1692
|
-
const k = ((O = (
|
|
1693
|
-
((
|
|
1694
|
-
),
|
|
1721
|
+
var R, O, U, q;
|
|
1722
|
+
const k = ((O = (R = i.storeOption) == null ? void 0 : R.company) == null ? void 0 : O.sstRegNo) ?? "", C = ae.cloneDeep(
|
|
1723
|
+
((U = i.storeOption) == null ? void 0 : U.inclusiveTaxes) ?? []
|
|
1724
|
+
), I = ((q = b.company) == null ? void 0 : q.sstRegNo) ?? "";
|
|
1695
1725
|
await u(
|
|
1696
1726
|
async () => {
|
|
1697
1727
|
var J;
|
|
1698
|
-
await
|
|
1728
|
+
await ge.updateStore(b), await i.readMemberStore(), (J = l.value) == null || J.showSheet(!1);
|
|
1699
1729
|
},
|
|
1700
1730
|
{
|
|
1701
1731
|
message: a("connect.store.setting.update.message"),
|
|
1702
1732
|
successMessage: a("connect.store.setting.update.success")
|
|
1703
1733
|
}
|
|
1704
1734
|
);
|
|
1705
|
-
const m = k !==
|
|
1735
|
+
const m = k !== I, n = !ae.isEqual(
|
|
1706
1736
|
C,
|
|
1707
1737
|
b.inclusiveTaxes ?? []
|
|
1708
1738
|
);
|
|
1709
1739
|
!(m || n) || i.sortedStoreCategories.flatMap(
|
|
1710
1740
|
(J) => J.bundles
|
|
1711
|
-
).length === 0 || await ne(b,
|
|
1741
|
+
).length === 0 || await ne(b, I, k);
|
|
1712
1742
|
}
|
|
1713
1743
|
async function H(b = -1) {
|
|
1714
1744
|
var k, C;
|
|
1715
|
-
if ((!i.storeOption || !i.storeOption.company) && await
|
|
1745
|
+
if ((!i.storeOption || !i.storeOption.company) && await be.confirm(
|
|
1716
1746
|
a("connect.store.category.setup.title"),
|
|
1717
1747
|
a("connect.store.category.setup.button"),
|
|
1718
1748
|
a("connect.store.category.setup.action"),
|
|
@@ -1726,39 +1756,39 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1726
1756
|
initialValue: ((C = d.value[b]) == null ? void 0 : C.name) ?? "",
|
|
1727
1757
|
action: b == -1 ? "add" : "edit"
|
|
1728
1758
|
}
|
|
1729
|
-
}).onPrimary(async (
|
|
1730
|
-
|
|
1759
|
+
}).onPrimary(async (I) => {
|
|
1760
|
+
I === null && !await be.remove(
|
|
1731
1761
|
a("connect.store.category.remove.confirm"),
|
|
1732
1762
|
a("connect.store.category.remove.title")
|
|
1733
1763
|
) || await u(
|
|
1734
1764
|
async () => {
|
|
1735
|
-
const m = b == -1 ? [...d.value, { name:
|
|
1736
|
-
await
|
|
1765
|
+
const m = b == -1 ? [...d.value, { name: I, bundles: [] }] : [...d.value].map((n, p) => p == b ? { ...n, name: I } : n).filter((n) => n.name !== null);
|
|
1766
|
+
await ge.updateStoreBundle({
|
|
1737
1767
|
categories: m
|
|
1738
1768
|
}), await i.readMemberStore();
|
|
1739
1769
|
},
|
|
1740
1770
|
{
|
|
1741
|
-
message:
|
|
1742
|
-
successMessage:
|
|
1771
|
+
message: I === null ? a("connect.store.category.update.deleting") : b == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
1772
|
+
successMessage: I === null ? a("connect.store.category.update.success.deleted") : b == -1 ? a("connect.store.category.update.success.created") : a("connect.store.category.update.success.updated")
|
|
1743
1773
|
}
|
|
1744
1774
|
);
|
|
1745
1775
|
});
|
|
1746
1776
|
}
|
|
1747
|
-
async function z(b, k, C,
|
|
1748
|
-
var p, y,
|
|
1749
|
-
k ?? (k = (p = w.value) == null ? void 0 : p.target.category), C ?? (C = (y = w.value) == null ? void 0 : y.target.index),
|
|
1777
|
+
async function z(b, k, C, I) {
|
|
1778
|
+
var p, y, R;
|
|
1779
|
+
k ?? (k = (p = w.value) == null ? void 0 : p.target.category), C ?? (C = (y = w.value) == null ? void 0 : y.target.index), I ?? (I = (R = w.value) == null ? void 0 : R.target.originalCategoryIndex);
|
|
1750
1780
|
const m = Fe(d.value);
|
|
1751
1781
|
for (const O of m)
|
|
1752
|
-
for (const
|
|
1753
|
-
console.log(
|
|
1754
|
-
k !=
|
|
1782
|
+
for (const U of O.bundles)
|
|
1783
|
+
console.log(U, "bundle in payload"), "pf_vouchers" in U && delete U.pf_vouchers;
|
|
1784
|
+
k != I && I != null && (m[I].bundles.splice(C, 1), C = m[k].bundles.length);
|
|
1755
1785
|
const n = m[k];
|
|
1756
1786
|
if (!n) {
|
|
1757
1787
|
st.error("Unexpected error", 2e3);
|
|
1758
1788
|
return;
|
|
1759
1789
|
}
|
|
1760
1790
|
if (b == null) {
|
|
1761
|
-
if (await
|
|
1791
|
+
if (await be.remove(
|
|
1762
1792
|
a("connect.store.bundle.delete.confirm"),
|
|
1763
1793
|
a("connect.store.bundle.delete.title")
|
|
1764
1794
|
) == !1)
|
|
@@ -1768,7 +1798,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1768
1798
|
C == -1 ? n.bundles.push(b) : n.bundles[C] = b;
|
|
1769
1799
|
await u(
|
|
1770
1800
|
async () => {
|
|
1771
|
-
var O,
|
|
1801
|
+
var O, U;
|
|
1772
1802
|
if (b != null) {
|
|
1773
1803
|
const q = (O = w.value) == null ? void 0 : O.bundleImage;
|
|
1774
1804
|
q === null && b.image ? (await Ve.delete(b.image), b.image = null) : q && (b.image = await Ve.update(
|
|
@@ -1776,9 +1806,9 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1776
1806
|
q
|
|
1777
1807
|
));
|
|
1778
1808
|
}
|
|
1779
|
-
await
|
|
1809
|
+
await ge.updateStoreBundle({
|
|
1780
1810
|
categories: m
|
|
1781
|
-
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (
|
|
1811
|
+
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (U = w.value) == null || U.showSheet(!1);
|
|
1782
1812
|
},
|
|
1783
1813
|
{
|
|
1784
1814
|
message: `${b == null ? "Deleting" : C == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1793,18 +1823,18 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1793
1823
|
bundle: b.bundle ? Fe(b.bundle) : void 0
|
|
1794
1824
|
});
|
|
1795
1825
|
}
|
|
1796
|
-
const F =
|
|
1797
|
-
function
|
|
1826
|
+
const F = N([]);
|
|
1827
|
+
function ie(b) {
|
|
1798
1828
|
var k;
|
|
1799
1829
|
(k = o.value) == null || k.showSheet({
|
|
1800
1830
|
bundle: b
|
|
1801
1831
|
});
|
|
1802
1832
|
}
|
|
1803
|
-
return
|
|
1833
|
+
return he(async () => {
|
|
1804
1834
|
var k, C;
|
|
1805
1835
|
await t(async () => {
|
|
1806
|
-
var
|
|
1807
|
-
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (
|
|
1836
|
+
var I, m;
|
|
1837
|
+
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (I = c.currentRoute.value.query) != null && I.action) {
|
|
1808
1838
|
switch ((m = c.currentRoute.value.query) == null ? void 0 : m.action) {
|
|
1809
1839
|
case "update_setting":
|
|
1810
1840
|
$("setting");
|
|
@@ -1815,7 +1845,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1815
1845
|
case "create_feedvibe_bundle":
|
|
1816
1846
|
f.open({
|
|
1817
1847
|
title: "Select category",
|
|
1818
|
-
contentComponent:
|
|
1848
|
+
contentComponent: Rt
|
|
1819
1849
|
}).onPrimary((n) => {
|
|
1820
1850
|
f.close(), oe({
|
|
1821
1851
|
categories: T.value,
|
|
@@ -1844,7 +1874,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1844
1874
|
v
|
|
1845
1875
|
];
|
|
1846
1876
|
}), (b, k) => {
|
|
1847
|
-
const C = _("FmPageHead"),
|
|
1877
|
+
const C = _("FmPageHead"), I = _("FmButton"), m = _("FmCard");
|
|
1848
1878
|
return h(), D(Y, null, [
|
|
1849
1879
|
r(C, {
|
|
1850
1880
|
title: e(a)("connect.store.title"),
|
|
@@ -1853,14 +1883,14 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1853
1883
|
}, null, 8, ["title", "actions"]),
|
|
1854
1884
|
V("div", gn, [
|
|
1855
1885
|
e(d) && e(d).length > 0 ? (h(), D(Y, { key: 0 }, [
|
|
1856
|
-
(h(!0), D(Y, null,
|
|
1886
|
+
(h(!0), D(Y, null, ce(e(d), (n, p) => (h(), D("div", {
|
|
1857
1887
|
key: n.name,
|
|
1858
1888
|
class: "space-y-8 py-12"
|
|
1859
1889
|
}, [
|
|
1860
1890
|
V("div", vn, [
|
|
1861
1891
|
V("div", hn, K(n.name), 1),
|
|
1862
1892
|
r(ke, { json: n }, null, 8, ["json"]),
|
|
1863
|
-
r(
|
|
1893
|
+
r(I, {
|
|
1864
1894
|
icon: "edit",
|
|
1865
1895
|
size: "md",
|
|
1866
1896
|
variant: "tertiary",
|
|
@@ -1868,17 +1898,17 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1868
1898
|
}, null, 8, ["onClick"])
|
|
1869
1899
|
]),
|
|
1870
1900
|
V("div", xn, [
|
|
1871
|
-
(h(!0), D(Y, null,
|
|
1901
|
+
(h(!0), D(Y, null, ce(n.bundles, (y, R) => (h(), M(Ft, {
|
|
1872
1902
|
bundle: y,
|
|
1873
1903
|
key: y._id,
|
|
1874
1904
|
onEdit: (O) => oe({
|
|
1875
1905
|
bundle: y,
|
|
1876
1906
|
category: p,
|
|
1877
|
-
index:
|
|
1907
|
+
index: R,
|
|
1878
1908
|
categories: e(T)
|
|
1879
1909
|
}),
|
|
1880
|
-
onDelete: (O) => z(null, p,
|
|
1881
|
-
onSend:
|
|
1910
|
+
onDelete: (O) => z(null, p, R),
|
|
1911
|
+
onSend: ie
|
|
1882
1912
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1883
1913
|
r(Vt, {
|
|
1884
1914
|
onCreate: (y) => oe({
|
|
@@ -1899,7 +1929,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1899
1929
|
variant: "outlined",
|
|
1900
1930
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1901
1931
|
}, {
|
|
1902
|
-
default:
|
|
1932
|
+
default: B(() => [
|
|
1903
1933
|
k[1] || (k[1] = V("img", {
|
|
1904
1934
|
src: Ge,
|
|
1905
1935
|
class: "aspect-square w-[150px]"
|
|
@@ -1908,7 +1938,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1908
1938
|
V("div", _n, K(e(a)("connect.store.bundle.title")), 1),
|
|
1909
1939
|
V("div", Sn, K(e(a)("connect.store.bundle.description")), 1)
|
|
1910
1940
|
]),
|
|
1911
|
-
r(
|
|
1941
|
+
r(I, {
|
|
1912
1942
|
variant: "primary",
|
|
1913
1943
|
label: e(a)("connect.store.actions.addCategory"),
|
|
1914
1944
|
icon: "add",
|