@feedmepos/mf-connect 0.1.38-beta.66 → 0.1.38-beta.68
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-BMD3DbZw.js → Analytic-DDSSxM8U.js} +14 -14
- package/dist/{App-Dmu_97KT.js → App-3YNakqss.js} +7 -7
- package/dist/{AuditLogs-VHXsFbG0.js → AuditLogs-BKIZ62qo.js} +9 -9
- package/dist/{Bin-H5eYDXCv.js → Bin-lzY_2FbW.js} +8 -8
- package/dist/{Broadcast-BEf5FBVy.js → Broadcast-DHQFXAYM.js} +10 -10
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bhw26PyY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B4DzR1H7.js} +6 -6
- package/dist/{Card-kO6RMLoh.js → Card-CtV8-Wdk.js} +17 -17
- package/dist/{Collections-o9KSs_nW.js → Collections-Btv6q2lY.js} +7 -7
- package/dist/{Credit-D143NbuT.js → Credit-BCoKxG0r.js} +10 -10
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-g5r_TxTy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKVNUp4L.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DMFkinru.js → EffectSheet.vue_vue_type_style_index_0_lang-DPwL7y2n.js} +6 -6
- package/dist/{Experience-D5b0q3qI.js → Experience-DUL-88xH.js} +10 -10
- package/dist/{FileSaver.min-meIJUdAL.js → FileSaver.min-wdxunVRb.js} +1 -1
- package/dist/{Game-D2bgLmbD.js → Game-D05KVsLV.js} +11 -11
- package/dist/{GenerateMaterial-BKQaryp_.js → GenerateMaterial-Bqxy-HQl.js} +6 -6
- package/dist/{Grab-LuS9nYfk.js → Grab-CRpoXnuQ.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C8rHZeXA.js → ImageInput.vue_vue_type_script_setup_true_lang-OpPYe4Uj.js} +1 -1
- package/dist/{Index-BxtqkJBu.js → Index-BjLqY0Hk.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BBzY-uiP.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BF4nNYBF.js} +1 -1
- package/dist/{MainLayout-ilqBWlQf.js → MainLayout-DmO4EqJ9.js} +1 -1
- package/dist/{Marketing-DTKQBBKX.js → Marketing-D0gCuI_X.js} +4 -4
- package/dist/{MarketingMaterialEdit-BEhYwtRN.js → MarketingMaterialEdit-CRxGq_2R.js} +4 -4
- package/dist/{Member-B9ugq-MK.js → Member-CHgbhLlV.js} +11 -11
- package/dist/{MemberList-DkEtzUBQ.js → MemberList-Dmrkw7sK.js} +25 -25
- package/dist/{MemberTransactions-f-ZPDMN1.js → MemberTransactions-CnIF9ZiL.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CU5wc5yh.js → MessageInput.vue_vue_type_script_setup_true_lang-CYTwDx2a.js} +4853 -4834
- package/dist/{Mission-KHRXljKR.js → Mission-BdmSWYnF.js} +11 -11
- package/dist/{Overview-DuCH_EwU.js → Overview-Payz8pfn.js} +18 -18
- package/dist/{Point-Djmk5mzF.js → Point-BTzs4Ou7.js} +10 -10
- package/dist/{Promotion-NvAXNPAC.js → Promotion-D2nP2e0f.js} +11 -11
- package/dist/{Queue-CEggG4n0.js → Queue-C9II7ly9.js} +10 -10
- package/dist/{Record-Cdjh_lvA.js → Record-BS9IB47x.js} +9 -9
- package/dist/{Reward-CzI6xVOs.js → Reward-D8-g2yag.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-SMEw9Knc.js → RewardGroup.vue_vue_type_script_setup_true_lang-CFQup7Ey.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-SgZhL9m1.js → RuleGroup.vue_vue_type_script_setup_true_lang-D1Ni5iQQ.js} +14 -14
- package/dist/{Segment-CFy6BQeZ.js → Segment-3wbAK-ru.js} +24 -24
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BDuapaHE.js → SelectItems.vue_vue_type_script_setup_true_lang-CG2DeiXX.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B5hlqodj.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D68B8EQ-.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DVOIOeF0.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-iCtUhdeJ.js} +4 -4
- package/dist/{Setting-XIfKS6s3.js → Setting-gi4ahgfG.js} +13 -13
- package/dist/{SettingAdvertisements-HDOFbmuC.js → SettingAdvertisements-BT-pT4Rv.js} +11 -11
- package/dist/{Store-CcEw5SUh.js → Store-Lr21bL9O.js} +260 -230
- package/dist/{StoreRewards-CSXACIqq.js → StoreRewards-Dxh1X2Pj.js} +14 -14
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-ewdZFwnK.js → StoreTransactions.vue_vue_type_script_setup_true_lang-KZMv82FF.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Dbp6toAh.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DjcHY_oV.js} +1 -1
- package/dist/{Tier-k8tDrGI_.js → Tier-5AJlHnKi.js} +23 -23
- package/dist/{Title-BbWWFyoe.js → Title-B1aG9RfZ.js} +20 -20
- package/dist/{Transaction-Cev7bwxP.js → Transaction-B76rwD8i.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-_Tp-c5Sq.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C92R5whE.js} +6 -6
- package/dist/{Voucher-B6f8Gu2c.js → Voucher-vBYXMxdg.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-_EvJfrpe.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CPSs8jr0.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CXq3i0bH.js → ZodTextField.vue_vue_type_script_setup_true_lang-08F6xX_S.js} +2 -2
- package/dist/{app-DTwM6_Sq.js → app-4fFfKt_P.js} +69 -54
- package/dist/app.js +1 -1
- package/dist/{business-Dbw5HJ04.js → business-EF0oafu7.js} +1 -1
- package/dist/{campaign-rMtxPwGn.js → campaign-Bd_DSi-h.js} +2 -2
- package/dist/{campaign-DCMBWpkn.js → campaign-DRQrjx1T.js} +8 -8
- package/dist/{campaign.enum-BZBB9gZ-.js → campaign.enum-DL60hi34.js} +1 -1
- package/dist/{campaign.fn-BncYunu-.js → campaign.fn-DnZH6wsz.js} +104 -104
- package/dist/{collectible.enum-DfsBVU6o.js → collectible.enum-BDYWv_Vs.js} +1 -1
- package/dist/{collection.fn-BT3JFF7K.js → collection.fn-OZWH1lMk.js} +2 -2
- package/dist/{dto-bz1fmkOx.js → dto-DSdrUjCg.js} +4 -4
- package/dist/{duplicateCampaign-DhwEIZeJ.js → duplicateCampaign-CVfnktSt.js} +2 -2
- package/dist/{effect-CuDyjImq.js → effect-DOlyAYE4.js} +1 -1
- package/dist/{email-addresses-DJ9xXGfL.js → email-addresses-BcT3YThk.js} +2 -2
- package/dist/{export-DqVsr8M_.js → export-h5etGBFq.js} +2 -2
- package/dist/{helper-ByykQMOx.js → helper-Bt92KKiH.js} +1 -1
- package/dist/{index-DxwdIN0K.js → index--F7J1iL3.js} +1 -1
- package/dist/{index-JQ5i2eIx.js → index-7_M_cp1Q.js} +3 -3
- package/dist/{index-D224oAyo.js → index-9v9lQSnC.js} +1 -1
- package/dist/index-BBEp8idk.js +28897 -0
- package/dist/index-BDqAWJZF.js +30289 -0
- package/dist/{index-C3dTVGE1.js → index-BKNEcAih.js} +4 -4
- package/dist/{index-Grr7sf1v.js → index-BXINARQi.js} +1 -1
- package/dist/{index-D0Wf5Gmf.js → index-CMrJUcgp.js} +1 -1
- package/dist/{index-129oSkjn.js → index-CXoC9WN0.js} +1 -1
- package/dist/{index-C9qqzKtO.js → index-CYidpYJd.js} +402 -402
- package/dist/{index-FSu_hzwp.js → index-DEWQIP9p.js} +1 -1
- package/dist/{index-BvNfmMAY.js → index-DNMo12QR.js} +1 -1
- package/dist/{index-DYgg3ggV.js → index-mkYBBpui.js} +6 -6
- package/dist/{index.esm2017-7Xban41w.js → index.esm2017-Bg0SH2V2.js} +1 -1
- package/dist/{loading-CeI7XavO.js → loading-BtT3HsLR.js} +2 -2
- package/dist/{lodash-DaLV_Qoq.js → lodash-D1Vi3odZ.js} +1 -1
- package/dist/{membership-ClhrKP9i.js → membership-Dmh6o86-.js} +3 -3
- package/dist/{money-CU4mt57O.js → money-DlH23fyf.js} +1 -1
- package/dist/{number-DVBI4eWs.js → number-Ds3PVttv.js} +1 -1
- package/dist/objectid-BvNQJW3a.js +145 -0
- package/dist/{plugins-CJWJtN5z.js → plugins-BPcVgyi3.js} +3 -3
- package/dist/{reward-BSXcv7H4.js → reward-DkYZJIPt.js} +1 -1
- package/dist/{rule-CUgtAWfh.js → rule-B2G7E5JS.js} +3 -3
- package/dist/{rule-builder-DWo0P5Nw.js → rule-builder-B-sx8Fay.js} +1 -1
- package/dist/{template-HvM0I6l8.js → template-C70M2IjW.js} +6 -6
- package/dist/{timezone-9ba8k_Ll.js → timezone-OmdQYEvP.js} +5 -2
- package/dist/{trigger-RhbSBW6h.js → trigger--B0d2i3e.js} +5 -5
- package/dist/{usePagination-h3zus0Bk.js → usePagination-DDnVygse.js} +1 -1
- package/dist/{user-B2Ae5sw8.js → user-B6jyhHiP.js} +1 -1
- package/dist/{vue-i18n-BdXl9UUY.js → vue-i18n-CAr-uxyM.js} +258 -258
- package/dist/{xlsx-B-znTtsE.js → xlsx-DYNtfQX2.js} +1 -1
- package/dist/{zod-ZnxWr0uZ.js → zod-ClIl9cnW.js} +1 -1
- package/package.json +4 -4
- package/dist/index-Cbs-ZGHs.js +0 -32456
- package/dist/index-lOtz7QlA.js +0 -30933
- package/dist/objectid-Rw-WM4vJ.js +0 -145
|
@@ -1,33 +1,33 @@
|
|
|
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 { m as
|
|
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-BBEp8idk.js";
|
|
5
|
+
import { m as be, u as Le } from "./loading-BtT3HsLR.js";
|
|
6
|
+
import { u as Te, C as fe } from "./membership-Dmh6o86-.js";
|
|
7
|
+
import { m as Qe, n as et, o as tt, p as Ae, q as nt } from "./index-BKNEcAih.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-D1Vi3odZ.js";
|
|
10
|
+
import { c as ue } from "./index-BDqAWJZF.js";
|
|
11
|
+
import { u as xe } from "./vue-i18n-CAr-uxyM.js";
|
|
12
|
+
import { Z as Q, g as G, a as X } from "./zod-ClIl9cnW.js";
|
|
13
|
+
import { z as ee, R as at } from "./app-4fFfKt_P.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-08F6xX_S.js";
|
|
16
|
+
import { a as lt, p as ge, n as st, f as Ve } from "./plugins-BPcVgyi3.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-CYidpYJd.js";
|
|
19
|
+
import { _ as it } from "./ImageInput.vue_vue_type_script_setup_true_lang-OpPYe4Uj.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 { m as yt } from "./index-
|
|
21
|
+
import { z as ut, a as ct } from "./money-DlH23fyf.js";
|
|
22
|
+
import { F as mt } from "./number-Ds3PVttv.js";
|
|
23
|
+
import { a as pt, t as ft } from "./helper-Bt92KKiH.js";
|
|
24
|
+
import "./index-CXoC9WN0.js";
|
|
25
|
+
import "./index-mkYBBpui.js";
|
|
26
|
+
import "./index-7_M_cp1Q.js";
|
|
27
|
+
import { m as yt } from "./index-BXINARQi.js";
|
|
28
28
|
import { useRouter as bt } from "vue-router";
|
|
29
29
|
function Ke(x) {
|
|
30
|
-
return
|
|
30
|
+
return ue.DineroFactory(x).toUnit();
|
|
31
31
|
}
|
|
32
32
|
function He(x, S, a, g, s = [], v = []) {
|
|
33
33
|
const o = rt.compact(
|
|
@@ -53,7 +53,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
53
53
|
});
|
|
54
54
|
},
|
|
55
55
|
{}
|
|
56
|
-
), i =
|
|
56
|
+
), i = ue.Calculator.calculate({
|
|
57
57
|
items: {
|
|
58
58
|
0: {
|
|
59
59
|
quantity: 1,
|
|
@@ -62,7 +62,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
62
62
|
level: 0,
|
|
63
63
|
type: {
|
|
64
64
|
type: "BY_AMOUNT",
|
|
65
|
-
amount:
|
|
65
|
+
amount: ue.DineroFactory(a).subtract(ue.Dinero.fromNumber({ number: g }).toObject()).toObject()
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
},
|
|
@@ -78,7 +78,7 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
78
78
|
name: t.name,
|
|
79
79
|
taxCode: t.taxCode,
|
|
80
80
|
rate: t.rate,
|
|
81
|
-
total:
|
|
81
|
+
total: ue.DineroFactory({
|
|
82
82
|
...i.items[0].taxes[t.taxCode].amount
|
|
83
83
|
}).convertPrecision(2).toObject()
|
|
84
84
|
}));
|
|
@@ -86,8 +86,8 @@ function He(x, S, a, g, s = [], v = []) {
|
|
|
86
86
|
function qe(x, S, a) {
|
|
87
87
|
return x ? x.reduce((g, s) => {
|
|
88
88
|
var v;
|
|
89
|
-
return (v = a.find((o) => o.systemCode === s.systemCode)) != null && v.inclusive || (g =
|
|
90
|
-
},
|
|
89
|
+
return (v = a.find((o) => o.systemCode === s.systemCode)) != null && v.inclusive || (g = ue.DineroFactory(g.toObject()).add(s.total)), g;
|
|
90
|
+
}, ue.DineroFactory(S)).toObject() : ue.DineroFactory(S).toObject();
|
|
91
91
|
}
|
|
92
92
|
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 = {
|
|
93
93
|
key: 2,
|
|
@@ -119,7 +119,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
119
119
|
variant: "outlined",
|
|
120
120
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center"
|
|
121
121
|
}, {
|
|
122
|
-
default:
|
|
122
|
+
default: B(() => [
|
|
123
123
|
V("div", gt, [
|
|
124
124
|
x.bundle.image ? (h(), D("img", {
|
|
125
125
|
key: 1,
|
|
@@ -141,13 +141,13 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
141
141
|
])) : E("", !0),
|
|
142
142
|
V("div", xt, [
|
|
143
143
|
r(d, { placement: "bottom-end" }, {
|
|
144
|
-
"menu-button":
|
|
144
|
+
"menu-button": B(() => [
|
|
145
145
|
r(u, {
|
|
146
146
|
icon: "more_vert",
|
|
147
147
|
variant: "tertiary"
|
|
148
148
|
})
|
|
149
149
|
]),
|
|
150
|
-
default:
|
|
150
|
+
default: B(() => [
|
|
151
151
|
r(f, {
|
|
152
152
|
onClick: c[0] || (c[0] = (l) => g("edit", x.bundle)),
|
|
153
153
|
icon: "edit",
|
|
@@ -163,7 +163,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
163
163
|
onClick: c[2] || (c[2] = (l) => g("delete", x.bundle)),
|
|
164
164
|
icon: "delete"
|
|
165
165
|
}, {
|
|
166
|
-
label:
|
|
166
|
+
label: B(() => [...c[3] || (c[3] = [
|
|
167
167
|
V("div", { class: "text-fm-color-typo-error fm-typo-en-body-md-400" }, " Delete ", -1)
|
|
168
168
|
])]),
|
|
169
169
|
_: 1
|
|
@@ -176,7 +176,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
176
176
|
V("div", Ct, K(x.bundle.name), 1),
|
|
177
177
|
V("div", _t, K(e(s) || "Free"), 1),
|
|
178
178
|
V("div", St, [
|
|
179
|
-
(h(!0), D(Y, null,
|
|
179
|
+
(h(!0), D(Y, null, ce(e(v), (l, w) => (h(), M(t, {
|
|
180
180
|
key: w,
|
|
181
181
|
label: l
|
|
182
182
|
}, null, 8, ["label"]))), 128))
|
|
@@ -190,14 +190,14 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
190
190
|
__name: "AddBundleCard",
|
|
191
191
|
emits: ["create"],
|
|
192
192
|
setup(x, { emit: S }) {
|
|
193
|
-
const { t: a } =
|
|
193
|
+
const { t: a } = xe(), g = S;
|
|
194
194
|
return (s, v) => {
|
|
195
195
|
const o = _("FmButton"), c = _("FmCard");
|
|
196
196
|
return h(), M(c, {
|
|
197
197
|
variant: "outlined",
|
|
198
198
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
199
199
|
}, {
|
|
200
|
-
default:
|
|
200
|
+
default: B(() => [
|
|
201
201
|
r(o, {
|
|
202
202
|
onClick: v[0] || (v[0] = (i) => g("create")),
|
|
203
203
|
label: e(a)("connect.store.actions.addBundle"),
|
|
@@ -222,7 +222,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
setup(x) {
|
|
225
|
-
const { t: S } =
|
|
225
|
+
const { t: S } = xe(), a = x, g = Ee(), { emitData: s, emitAction: v } = je(), o = N(a.initialValue), c = ee.string().min(1);
|
|
226
226
|
function i() {
|
|
227
227
|
s(o.value), v("primary"), g.close();
|
|
228
228
|
}
|
|
@@ -234,7 +234,7 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
234
234
|
return h(), D("div", wt, [
|
|
235
235
|
r(d, {
|
|
236
236
|
modelValue: e(o),
|
|
237
|
-
"onUpdate:modelValue": f[0] || (f[0] = (l) =>
|
|
237
|
+
"onUpdate:modelValue": f[0] || (f[0] = (l) => re(o) ? o.value = l : null),
|
|
238
238
|
label: e(S)("connect.store.category.label"),
|
|
239
239
|
rules: [e(Q).toRule(e(c))]
|
|
240
240
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
@@ -263,10 +263,10 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
263
263
|
]);
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
}), $t = { class: "space-y-16" },
|
|
266
|
+
}), $t = { class: "space-y-16" }, Ut = { class: "flex items-center justify-end gap-8 pb-16" }, Rt = /* @__PURE__ */ te({
|
|
267
267
|
__name: "SelectCategoryDialog",
|
|
268
268
|
setup(x) {
|
|
269
|
-
const { emitData: S, emitAction: a } = je(), g = Te(), s =
|
|
269
|
+
const { emitData: S, emitAction: a } = je(), g = Te(), s = N(), v = L(
|
|
270
270
|
() => g.sortedStoreCategories.map((o, c) => ({
|
|
271
271
|
label: o.name,
|
|
272
272
|
value: c
|
|
@@ -281,12 +281,12 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
281
281
|
items: e(v),
|
|
282
282
|
modelValue: e(s),
|
|
283
283
|
"onUpdate:modelValue": [
|
|
284
|
-
c[0] || (c[0] = (u) =>
|
|
284
|
+
c[0] || (c[0] = (u) => re(s) ? s.value = u : null),
|
|
285
285
|
c[1] || (c[1] = (u) => e(S)(u))
|
|
286
286
|
],
|
|
287
287
|
label: "Category"
|
|
288
288
|
}, null, 8, ["items", "modelValue"]),
|
|
289
|
-
V("div",
|
|
289
|
+
V("div", Ut, [
|
|
290
290
|
r(t, {
|
|
291
291
|
variant: "tertiary",
|
|
292
292
|
label: "Cancel",
|
|
@@ -302,11 +302,11 @@ const gt = { class: "relative h-[120px] aspect-video flex items-center justify-c
|
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
|
-
function
|
|
305
|
+
function se(x) {
|
|
306
306
|
return x.states.map((S) => ({ label: S, value: S }));
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
[
|
|
308
|
+
const It = {
|
|
309
|
+
[_e.F_COUNTRY.enum.MY]: {
|
|
310
310
|
states: [
|
|
311
311
|
"Johor",
|
|
312
312
|
"Kedah",
|
|
@@ -326,16 +326,46 @@ const Bt = {
|
|
|
326
326
|
"Terengganu"
|
|
327
327
|
],
|
|
328
328
|
get stateItems() {
|
|
329
|
-
return
|
|
329
|
+
return se(this);
|
|
330
330
|
}
|
|
331
331
|
},
|
|
332
|
-
[
|
|
332
|
+
[_e.F_COUNTRY.enum.SG]: {
|
|
333
333
|
states: [],
|
|
334
334
|
get stateItems() {
|
|
335
|
-
return
|
|
335
|
+
return se(this);
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
|
-
|
|
338
|
+
JP: {
|
|
339
|
+
states: [],
|
|
340
|
+
get stateItems() {
|
|
341
|
+
return se(this);
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
AE: {
|
|
345
|
+
states: [],
|
|
346
|
+
get stateItems() {
|
|
347
|
+
return se(this);
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
AU: {
|
|
351
|
+
states: [],
|
|
352
|
+
get stateItems() {
|
|
353
|
+
return se(this);
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
MO: {
|
|
357
|
+
states: [],
|
|
358
|
+
get stateItems() {
|
|
359
|
+
return se(this);
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
VN: {
|
|
363
|
+
states: [],
|
|
364
|
+
get stateItems() {
|
|
365
|
+
return se(this);
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
[_e.F_COUNTRY.enum.ID]: {
|
|
339
369
|
states: [
|
|
340
370
|
"Aceh",
|
|
341
371
|
"Bali",
|
|
@@ -372,10 +402,10 @@ const Bt = {
|
|
|
372
402
|
"West Sumatra"
|
|
373
403
|
],
|
|
374
404
|
get stateItems() {
|
|
375
|
-
return
|
|
405
|
+
return se(this);
|
|
376
406
|
}
|
|
377
407
|
},
|
|
378
|
-
[
|
|
408
|
+
[_e.F_COUNTRY.enum.TH]: {
|
|
379
409
|
states: [
|
|
380
410
|
"Bangkok",
|
|
381
411
|
"Amnat Charoen",
|
|
@@ -456,43 +486,43 @@ const Bt = {
|
|
|
456
486
|
"Yasothon"
|
|
457
487
|
],
|
|
458
488
|
get stateItems() {
|
|
459
|
-
return
|
|
489
|
+
return se(this);
|
|
460
490
|
}
|
|
461
491
|
}
|
|
462
|
-
},
|
|
492
|
+
}, ye = () => A.Config.getCountry(), ve = {
|
|
463
493
|
get fullCurrency() {
|
|
464
|
-
return
|
|
494
|
+
return ye().currency;
|
|
465
495
|
},
|
|
466
496
|
get currency() {
|
|
467
|
-
return
|
|
497
|
+
return ye().currency.code;
|
|
468
498
|
},
|
|
469
499
|
get fullTax() {
|
|
470
|
-
return A.Country.getCountryFlattenTaxes(
|
|
500
|
+
return A.Country.getCountryFlattenTaxes(ye().code);
|
|
471
501
|
},
|
|
472
502
|
get taxSystem() {
|
|
473
|
-
return
|
|
503
|
+
return ye().taxSystems;
|
|
474
504
|
},
|
|
475
505
|
taxInclusion(x) {
|
|
476
|
-
return
|
|
506
|
+
return ve.taxSystem.map((S) => ({
|
|
477
507
|
systemCode: S.code,
|
|
478
508
|
inclusive: x !== void 0 ? x : !1
|
|
479
509
|
}));
|
|
480
510
|
},
|
|
481
511
|
groupedTaxOptions() {
|
|
482
|
-
const x = A.Country.getCountryFlattenTaxes(
|
|
483
|
-
return
|
|
512
|
+
const x = A.Country.getCountryFlattenTaxes(ye().code);
|
|
513
|
+
return ve.taxSystem.map((S) => ({
|
|
484
514
|
code: S.code,
|
|
485
|
-
options: x.map((a) => ({ ...a, feedmeTaxCode:
|
|
515
|
+
options: x.map((a) => ({ ...a, feedmeTaxCode: ve.generateCode(a) })).filter((a) => a.systemCode === S.code)
|
|
486
516
|
}));
|
|
487
517
|
},
|
|
488
518
|
systemDefaultCode(x) {
|
|
489
|
-
const S =
|
|
519
|
+
const S = ve.groupedTaxOptions().find((a) => a.code === x);
|
|
490
520
|
return S == null ? void 0 : S.options.find((a) => a.default);
|
|
491
521
|
},
|
|
492
522
|
generateCode(x) {
|
|
493
523
|
return `${x.systemCode}/${x.taxCode}`;
|
|
494
524
|
}
|
|
495
|
-
}, W =
|
|
525
|
+
}, W = ve, Bt = /* @__PURE__ */ te({
|
|
496
526
|
__name: "TaxInclusiveSetting",
|
|
497
527
|
props: {
|
|
498
528
|
modelValue: {
|
|
@@ -503,7 +533,7 @@ const Bt = {
|
|
|
503
533
|
},
|
|
504
534
|
emits: ["update:model-value"],
|
|
505
535
|
setup(x, { emit: S }) {
|
|
506
|
-
const a = x, g = W.taxSystem, s = S, v =
|
|
536
|
+
const a = x, g = W.taxSystem, s = S, v = N(a.modelValue);
|
|
507
537
|
function o(u, f) {
|
|
508
538
|
const d = ae.clone(a.modelValue), T = d.findIndex((l) => l.systemCode === u);
|
|
509
539
|
T >= 0 ? d[T].inclusive = f : d.push({
|
|
@@ -529,7 +559,7 @@ const Bt = {
|
|
|
529
559
|
function t(u, f) {
|
|
530
560
|
return `${u} ${f ? "Inclusive" : "Exclusive"}`;
|
|
531
561
|
}
|
|
532
|
-
return
|
|
562
|
+
return he(() => {
|
|
533
563
|
a.modelValue.length || o(g[0].code, !1);
|
|
534
564
|
}), Pe(
|
|
535
565
|
() => a.modelValue,
|
|
@@ -538,7 +568,7 @@ const Bt = {
|
|
|
538
568
|
}
|
|
539
569
|
), (u, f) => {
|
|
540
570
|
const d = _("FmSwitch");
|
|
541
|
-
return h(!0), D(Y, null,
|
|
571
|
+
return h(!0), D(Y, null, ce(e(i), (T, l) => {
|
|
542
572
|
var w;
|
|
543
573
|
return h(), D("div", { key: l }, [
|
|
544
574
|
r(d, {
|
|
@@ -546,7 +576,7 @@ const Bt = {
|
|
|
546
576
|
"label-placement": "left",
|
|
547
577
|
"onUpdate:modelValue": ($) => T.input($)
|
|
548
578
|
}, {
|
|
549
|
-
label:
|
|
579
|
+
label: B(() => {
|
|
550
580
|
var $;
|
|
551
581
|
return [
|
|
552
582
|
V("div", null, K(t(T.label, (($ = e(v)[l]) == null ? void 0 : $.inclusive) || !1)), 1)
|
|
@@ -559,7 +589,7 @@ const Bt = {
|
|
|
559
589
|
};
|
|
560
590
|
}
|
|
561
591
|
});
|
|
562
|
-
var
|
|
592
|
+
var Nt = { mode: "development", appMode: "mf" };
|
|
563
593
|
const Dt = { class: "space-y-8" }, Mt = {
|
|
564
594
|
key: 0,
|
|
565
595
|
class: "space-y-16"
|
|
@@ -570,7 +600,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
570
600
|
},
|
|
571
601
|
emits: ["update:modelValue"],
|
|
572
602
|
setup(x, { emit: S }) {
|
|
573
|
-
const a = x, g = S, s =
|
|
603
|
+
const a = x, g = S, s = N(!1);
|
|
574
604
|
Pe(s, (o, c) => {
|
|
575
605
|
c != o && (!a.modelValue && o ? g("update:modelValue", {
|
|
576
606
|
apiKey: "",
|
|
@@ -578,17 +608,17 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
578
608
|
}) : o || g("update:modelValue", void 0));
|
|
579
609
|
});
|
|
580
610
|
const v = L(() => {
|
|
581
|
-
const o =
|
|
611
|
+
const o = Nt.mode === "development", c = A.Config.getCountry().code.toLowerCase(), i = c != "my" ? `.${c}` : "";
|
|
582
612
|
return `https://marketing${o ? "-dev" : ""}${i}.feedmeapi.com/stripe/${Ze.getBusinessId()}/webhook`;
|
|
583
613
|
});
|
|
584
|
-
return
|
|
614
|
+
return he(() => {
|
|
585
615
|
s.value = !!a.modelValue;
|
|
586
616
|
}), (o, c) => {
|
|
587
617
|
const i = _("FmSwitch"), t = _("FmTextField"), u = _("FmButton");
|
|
588
618
|
return h(), D("div", Dt, [
|
|
589
619
|
r(i, {
|
|
590
620
|
modelValue: e(s),
|
|
591
|
-
"onUpdate:modelValue": c[0] || (c[0] = (f) =>
|
|
621
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => re(s) ? s.value = f : null),
|
|
592
622
|
value: "true",
|
|
593
623
|
label: "Enable Stripe"
|
|
594
624
|
}, null, 8, ["modelValue"]),
|
|
@@ -605,7 +635,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
605
635
|
readonly: "",
|
|
606
636
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
607
637
|
}, {
|
|
608
|
-
append:
|
|
638
|
+
append: B(() => [
|
|
609
639
|
r(u, {
|
|
610
640
|
icon: "content_copy",
|
|
611
641
|
variant: "tertiary",
|
|
@@ -635,7 +665,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
635
665
|
__name: "StoreSettingSheet",
|
|
636
666
|
emits: ["update"],
|
|
637
667
|
setup(x, { expose: S, emit: a }) {
|
|
638
|
-
const { t: g } =
|
|
668
|
+
const { t: g } = xe(), s = a, v = N(!1), o = N(), c = N(!1), i = Qe.extend({
|
|
639
669
|
company: et.extend({
|
|
640
670
|
name: ee.string().min(1, "Company name is required"),
|
|
641
671
|
regNo: ee.string().min(1, "Registration number is required"),
|
|
@@ -685,10 +715,10 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
685
715
|
return h(), M(H, {
|
|
686
716
|
"max-width": 560,
|
|
687
717
|
modelValue: e(v),
|
|
688
|
-
"onUpdate:modelValue": l[15] || (l[15] = (z) =>
|
|
718
|
+
"onUpdate:modelValue": l[15] || (l[15] = (z) => re(v) ? v.value = z : null),
|
|
689
719
|
header: e(g)("connect.store.setting.title")
|
|
690
720
|
}, {
|
|
691
|
-
"side-sheet-footer":
|
|
721
|
+
"side-sheet-footer": B(() => [
|
|
692
722
|
V("div", Jt, [
|
|
693
723
|
r(Z, {
|
|
694
724
|
label: e(g)("connect.common.save"),
|
|
@@ -703,7 +733,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
703
733
|
}, null, 8, ["label"])
|
|
704
734
|
])
|
|
705
735
|
]),
|
|
706
|
-
default:
|
|
736
|
+
default: B(() => {
|
|
707
737
|
var z, oe;
|
|
708
738
|
return [
|
|
709
739
|
r(ke, { json: e(o) }, null, 8, ["json"]),
|
|
@@ -733,7 +763,7 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
733
763
|
}, null, 8, ["modelValue", "label", "schema"])) : E("", !0),
|
|
734
764
|
(z = e(o).company) != null && z.sstRegNo && e(o).inclusiveTaxes ? (h(), D("div", jt, [
|
|
735
765
|
V("div", Lt, K(e(g)("connect.store.setting.company.tax")), 1),
|
|
736
|
-
r(
|
|
766
|
+
r(Bt, {
|
|
737
767
|
modelValue: e(o).inclusiveTaxes,
|
|
738
768
|
"onUpdate:modelValue": l[4] || (l[4] = (F) => e(o).inclusiveTaxes = F)
|
|
739
769
|
}, null, 8, ["modelValue"])
|
|
@@ -776,14 +806,14 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
776
806
|
placement: "top-end",
|
|
777
807
|
"model-value": e(c)
|
|
778
808
|
}, {
|
|
779
|
-
"menu-button":
|
|
809
|
+
"menu-button": B(() => [
|
|
780
810
|
r(le, {
|
|
781
811
|
modelValue: e(o).company.address.state,
|
|
782
812
|
"onUpdate:modelValue": l[10] || (l[10] = (F) => e(o).company.address.state = F),
|
|
783
813
|
schema: e(Q).typeAtPath(e(i), "company.address.state"),
|
|
784
814
|
onFocusChanged: l[11] || (l[11] = (F) => c.value = F)
|
|
785
815
|
}, {
|
|
786
|
-
append:
|
|
816
|
+
append: B(() => [
|
|
787
817
|
r(w, {
|
|
788
818
|
name: e(c) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
789
819
|
}, null, 8, ["name"])
|
|
@@ -791,11 +821,11 @@ const Dt = { class: "space-y-8" }, Mt = {
|
|
|
791
821
|
_: 1
|
|
792
822
|
}, 8, ["modelValue", "schema"])
|
|
793
823
|
]),
|
|
794
|
-
default:
|
|
795
|
-
(h(!0), D(Y, null,
|
|
824
|
+
default: B(() => [
|
|
825
|
+
(h(!0), D(Y, null, ce(e(It)[e(A.Config).getCountry().code].stateItems.filter(
|
|
796
826
|
(F) => {
|
|
797
|
-
var
|
|
798
|
-
return F.label.toLowerCase().includes(((b = (
|
|
827
|
+
var ie, b;
|
|
828
|
+
return F.label.toLowerCase().includes(((b = (ie = e(o)) == null ? void 0 : ie.company) == null ? void 0 : b.address.state.toLowerCase()) ?? "");
|
|
799
829
|
}
|
|
800
830
|
) || [], (F) => (h(), M($, {
|
|
801
831
|
key: F.value,
|
|
@@ -852,7 +882,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
852
882
|
emits: ["update:modelValue"],
|
|
853
883
|
setup(x, { emit: S }) {
|
|
854
884
|
const a = x, g = S;
|
|
855
|
-
|
|
885
|
+
he(() => {
|
|
856
886
|
if (o.value.length !== v.value.length) {
|
|
857
887
|
const t = v.value.reduce((u, f) => {
|
|
858
888
|
const d = W.systemDefaultCode(f.name);
|
|
@@ -897,7 +927,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
897
927
|
}
|
|
898
928
|
return (t, u) => {
|
|
899
929
|
const f = _("FmRadio"), d = _("FmRadioGroup");
|
|
900
|
-
return h(!0), D(Y, null,
|
|
930
|
+
return h(!0), D(Y, null, ce(e(v), (T) => (h(), D("div", {
|
|
901
931
|
key: T.name,
|
|
902
932
|
class: "flex items-start"
|
|
903
933
|
}, [
|
|
@@ -910,8 +940,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
910
940
|
})
|
|
911
941
|
]
|
|
912
942
|
}, {
|
|
913
|
-
default:
|
|
914
|
-
(h(!0), D(Y, null,
|
|
943
|
+
default: B(() => [
|
|
944
|
+
(h(!0), D(Y, null, ce(T.options, (l, w) => (h(), M(f, {
|
|
915
945
|
key: w,
|
|
916
946
|
value: l.value,
|
|
917
947
|
label: l.label
|
|
@@ -952,11 +982,11 @@ const Zt = /* @__PURE__ */ te({
|
|
|
952
982
|
__name: "EditBundleSheet",
|
|
953
983
|
emits: ["update"],
|
|
954
984
|
setup(x, { expose: S, emit: a }) {
|
|
955
|
-
const g = a, { t: s } =
|
|
985
|
+
const g = a, { t: s } = xe(), v = Te(), o = N(!1), c = N([]), i = N({
|
|
956
986
|
category: 0,
|
|
957
987
|
index: -1,
|
|
958
988
|
originalCategoryIndex: void 0
|
|
959
|
-
}), t =
|
|
989
|
+
}), t = N(ae.cloneDeep(we)), u = N(), f = Ae, d = L(() => {
|
|
960
990
|
const m = f.safeParse(t.value);
|
|
961
991
|
return m.success ? [] : m.error.errors;
|
|
962
992
|
}), T = [
|
|
@@ -970,7 +1000,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
970
1000
|
header: "Reward type",
|
|
971
1001
|
accessorFn: (m) => m.collectible.type,
|
|
972
1002
|
cell(m) {
|
|
973
|
-
return
|
|
1003
|
+
return fe[m.row.original.collectible.type].chip();
|
|
974
1004
|
}
|
|
975
1005
|
},
|
|
976
1006
|
{
|
|
@@ -982,7 +1012,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
982
1012
|
return n.collectible.type == "VOUCHER" || n.selectedReward == null ? n.description : Je(Xe.FmStepperField, {
|
|
983
1013
|
"onUpdate:modelValue": (y) => {
|
|
984
1014
|
t.value.titles = t.value.titles.map(
|
|
985
|
-
(
|
|
1015
|
+
(R) => R.id == n.collectible._id ? { ...R, dayToExpire: y } : R
|
|
986
1016
|
);
|
|
987
1017
|
},
|
|
988
1018
|
modelValue: ((p = n.selectedReward) == null ? void 0 : p.extra) ?? 0,
|
|
@@ -996,19 +1026,19 @@ const Zt = /* @__PURE__ */ te({
|
|
|
996
1026
|
});
|
|
997
1027
|
}
|
|
998
1028
|
}
|
|
999
|
-
], l =
|
|
1029
|
+
], l = N([]), w = L(() => {
|
|
1000
1030
|
var n;
|
|
1001
1031
|
const m = (n = t.value) != null && n.isFeedvibe ? "STORE_BUNDLE:FEEDVIBE" : "STORE_BUNDLE:DEFAULT";
|
|
1002
1032
|
return v.bundleRewards.filter((p) => {
|
|
1003
1033
|
var y;
|
|
1004
1034
|
return (y = t.value) != null && y.isFeedvibe && p.type !== "VOUCHER" ? !1 : pt(p.capabilities, m);
|
|
1005
1035
|
}).map((p) => {
|
|
1006
|
-
const y = $.value.find((O) => O.id == p._id),
|
|
1036
|
+
const y = $.value.find((O) => O.id == p._id), R = p.type === "VOUCHER" ? `${p.options.maxUse} use(s), ${ft(
|
|
1007
1037
|
p.options.validityOption || {}
|
|
1008
1038
|
)}` : "No expiry";
|
|
1009
1039
|
return {
|
|
1010
1040
|
collectible: p,
|
|
1011
|
-
description:
|
|
1041
|
+
description: R,
|
|
1012
1042
|
selectedReward: y
|
|
1013
1043
|
};
|
|
1014
1044
|
});
|
|
@@ -1039,18 +1069,18 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1039
1069
|
for (let p = 0; p < m.length; p++) {
|
|
1040
1070
|
const y = m[p];
|
|
1041
1071
|
H.value[p] ? y.collectible.type == "TITLE" ? n.titles.findIndex(
|
|
1042
|
-
(
|
|
1072
|
+
(U) => U.id == y.collectible._id
|
|
1043
1073
|
) < 0 && n.titles.push({
|
|
1044
1074
|
id: y.collectible._id,
|
|
1045
1075
|
dayToExpire: j.value
|
|
1046
1076
|
}) : n.vouchers.findIndex(
|
|
1047
|
-
(
|
|
1077
|
+
(U) => U == y.collectible._id
|
|
1048
1078
|
) < 0 && n.vouchers.push(y.collectible._id) : (n.titles = n.titles.filter((O) => O.id != y.collectible._id), n.vouchers = n.vouchers.filter(
|
|
1049
1079
|
(O) => O != y.collectible._id
|
|
1050
1080
|
));
|
|
1051
1081
|
}
|
|
1052
1082
|
}
|
|
1053
|
-
const H =
|
|
1083
|
+
const H = N({});
|
|
1054
1084
|
Pe(H, Z, { deep: !0 });
|
|
1055
1085
|
const z = L(() => {
|
|
1056
1086
|
var m, n;
|
|
@@ -1068,7 +1098,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1068
1098
|
((m = v.storeOption) == null ? void 0 : m.inclusiveTaxes) ?? [],
|
|
1069
1099
|
(p = (n = v.storeOption) == null ? void 0 : n.company) != null && p.sstRegNo ? W.taxSystem.map((y) => y.code) : []
|
|
1070
1100
|
);
|
|
1071
|
-
}),
|
|
1101
|
+
}), ie = L(() => F.value.reduce(
|
|
1072
1102
|
(n, p) => n.add(p.total),
|
|
1073
1103
|
ct()
|
|
1074
1104
|
).toFormat()), b = L(() => {
|
|
@@ -1088,44 +1118,44 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1088
1118
|
function C() {
|
|
1089
1119
|
return ae.cloneDeep(we);
|
|
1090
1120
|
}
|
|
1091
|
-
function
|
|
1092
|
-
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,
|
|
1121
|
+
function I(m, n) {
|
|
1122
|
+
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), {}));
|
|
1093
1123
|
}
|
|
1094
1124
|
return S({
|
|
1095
|
-
showSheet:
|
|
1125
|
+
showSheet: I,
|
|
1096
1126
|
bundleImage: u,
|
|
1097
1127
|
target: i,
|
|
1098
1128
|
data: t
|
|
1099
1129
|
}), (m, n) => {
|
|
1100
|
-
const p = _("FmSwitch"), y = _("FmHelperText"),
|
|
1101
|
-
return h(), M(
|
|
1130
|
+
const p = _("FmSwitch"), y = _("FmHelperText"), R = _("FmTextField"), O = _("FmSelect"), U = _("FmStepperField"), q = _("FmMenuItem"), J = _("FmTable"), pe = _("FmButton"), Ce = _("FmSideSheet");
|
|
1131
|
+
return h(), M(Ce, {
|
|
1102
1132
|
"max-width": 768,
|
|
1103
1133
|
modelValue: e(o),
|
|
1104
|
-
"onUpdate:modelValue": n[21] || (n[21] = (
|
|
1134
|
+
"onUpdate:modelValue": n[21] || (n[21] = (de) => re(o) ? o.value = de : null),
|
|
1105
1135
|
header: e(i).index != -1 ? e(s)("connect.store.bundle.edit.title") : e(s)("connect.store.bundle.edit.create")
|
|
1106
1136
|
}, {
|
|
1107
|
-
"side-sheet-footer":
|
|
1137
|
+
"side-sheet-footer": B(() => [
|
|
1108
1138
|
V("div", cn, [
|
|
1109
|
-
r(
|
|
1139
|
+
r(pe, {
|
|
1110
1140
|
label: e(i).index != -1 ? "Save" : "Add",
|
|
1111
1141
|
onClick: k,
|
|
1112
1142
|
disabled: e(d).length > 0,
|
|
1113
1143
|
loading: e(Se)().isLoading
|
|
1114
1144
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
1115
|
-
r(
|
|
1145
|
+
r(pe, {
|
|
1116
1146
|
label: "Cancel",
|
|
1117
|
-
onClick: n[20] || (n[20] = (
|
|
1147
|
+
onClick: n[20] || (n[20] = (de) => I(!1)),
|
|
1118
1148
|
variant: "tertiary"
|
|
1119
1149
|
})
|
|
1120
1150
|
])
|
|
1121
1151
|
]),
|
|
1122
|
-
default:
|
|
1123
|
-
var
|
|
1152
|
+
default: B(() => {
|
|
1153
|
+
var de, $e, Ue, Re, Ie, Be, Ne, De, Me, Oe;
|
|
1124
1154
|
return [
|
|
1125
1155
|
r(ke, { json: e(t) }, null, 8, ["json"]),
|
|
1126
1156
|
e(t) ? (h(), D("div", Qt, [
|
|
1127
1157
|
V("div", en, [
|
|
1128
|
-
e(A.Config).getCountry().code == "MY" && ((
|
|
1158
|
+
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, {
|
|
1129
1159
|
key: 0,
|
|
1130
1160
|
"onUpdate:modelValue": n[0] || (n[0] = (P) => {
|
|
1131
1161
|
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);
|
|
@@ -1142,7 +1172,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1142
1172
|
})) : E("", !0)
|
|
1143
1173
|
]),
|
|
1144
1174
|
V("div", tn, K(e(s)("connect.store.bundle.edit.basicInformation")), 1),
|
|
1145
|
-
r(
|
|
1175
|
+
r(R, {
|
|
1146
1176
|
label: e(s)("connect.store.bundle.edit.bundleName"),
|
|
1147
1177
|
modelValue: e(t).name,
|
|
1148
1178
|
"onUpdate:modelValue": n[1] || (n[1] = (P) => e(t).name = P),
|
|
@@ -1167,7 +1197,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1167
1197
|
"helper-state": e(G)(e(d), "image"),
|
|
1168
1198
|
"helper-text": e(X)(e(d), "image")
|
|
1169
1199
|
}, null, 8, ["label", "thumbnail", "file", "helper-state", "helper-text"]),
|
|
1170
|
-
r(
|
|
1200
|
+
r(U, {
|
|
1171
1201
|
"model-value": e(A.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1172
1202
|
label: e(s)("connect.store.bundle.edit.bundlePrice"),
|
|
1173
1203
|
min: 0,
|
|
@@ -1182,12 +1212,12 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1182
1212
|
)} = ${e(A.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1183
1213
|
"helper-state": e(G)(e(d), "price")
|
|
1184
1214
|
}, {
|
|
1185
|
-
prepend:
|
|
1186
|
-
|
|
1215
|
+
prepend: B(() => [
|
|
1216
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1187
1217
|
]),
|
|
1188
1218
|
_: 1
|
|
1189
1219
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1190
|
-
r(
|
|
1220
|
+
r(U, {
|
|
1191
1221
|
"model-value": e(A.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1192
1222
|
label: e(s)("connect.store.bundle.edit.bundleValue"),
|
|
1193
1223
|
min: 0,
|
|
@@ -1200,12 +1230,12 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1200
1230
|
"helper-text": e(X)(e(d), "originalPrice") || e(s)("connect.store.bundle.edit.originalPriceHelper"),
|
|
1201
1231
|
"helper-state": e(G)(e(d), "originalPrice")
|
|
1202
1232
|
}, {
|
|
1203
|
-
prepend:
|
|
1204
|
-
|
|
1233
|
+
prepend: B(() => [
|
|
1234
|
+
me(K(e(A.Dinero).defaultCurrency()), 1)
|
|
1205
1235
|
]),
|
|
1206
1236
|
_: 1
|
|
1207
1237
|
}, 8, ["model-value", "label", "helper-text", "helper-state"]),
|
|
1208
|
-
e(t).isFeedvibe ? E("", !0) : (h(), M(
|
|
1238
|
+
e(t).isFeedvibe ? E("", !0) : (h(), M(U, {
|
|
1209
1239
|
key: 0,
|
|
1210
1240
|
"model-value": e(t).coinPrice ?? null,
|
|
1211
1241
|
label: e(s)("connect.store.bundle.edit.pointNeeded"),
|
|
@@ -1217,21 +1247,21 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1217
1247
|
"helper-state": e(G)(e(d), "coinPrice"),
|
|
1218
1248
|
"helper-text": e(X)(e(d), "coinPrice")
|
|
1219
1249
|
}, {
|
|
1220
|
-
append:
|
|
1221
|
-
|
|
1250
|
+
append: B(() => [...n[22] || (n[22] = [
|
|
1251
|
+
me(" point(s) ", -1)
|
|
1222
1252
|
])]),
|
|
1223
1253
|
_: 1
|
|
1224
1254
|
}, 8, ["model-value", "label", "helper-state", "helper-text"])),
|
|
1225
|
-
(
|
|
1255
|
+
(Ue = e(v).storeOption) != null && Ue.stripe && !e(t).isFeedvibe ? (h(), D(Y, { key: 1 }, [
|
|
1226
1256
|
V("div", nn, K(e(s)("connect.store.bundle.edit.subscriptionSettings")), 1),
|
|
1227
|
-
r(
|
|
1257
|
+
r(R, {
|
|
1228
1258
|
label: e(s)("connect.store.bundle.edit.stripePriceId"),
|
|
1229
1259
|
modelValue: e(t).stripePriceId,
|
|
1230
1260
|
"onUpdate:modelValue": n[7] || (n[7] = (P) => e(t).stripePriceId = P),
|
|
1231
1261
|
"helper-state": e(G)(e(d), "stripePriceId"),
|
|
1232
1262
|
"helper-text": e(X)(e(d), "stripePriceId")
|
|
1233
1263
|
}, null, 8, ["label", "modelValue", "helper-state", "helper-text"]),
|
|
1234
|
-
e(t).stripePriceId ? (h(), M(
|
|
1264
|
+
e(t).stripePriceId ? (h(), M(U, {
|
|
1235
1265
|
key: 0,
|
|
1236
1266
|
"model-value": e(t).subscriptionValidity ?? null,
|
|
1237
1267
|
min: 1,
|
|
@@ -1244,7 +1274,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1244
1274
|
], 64)) : E("", !0),
|
|
1245
1275
|
e(t).isFeedvibe ? E("", !0) : (h(), D(Y, { key: 2 }, [
|
|
1246
1276
|
V("div", on, K(e(s)("connect.store.bundle.edit.credit")), 1),
|
|
1247
|
-
r(
|
|
1277
|
+
r(U, {
|
|
1248
1278
|
modelValue: e(t).credit.normal,
|
|
1249
1279
|
"onUpdate:modelValue": n[8] || (n[8] = (P) => e(t).credit.normal = P),
|
|
1250
1280
|
label: e(s)("connect.store.bundle.edit.normalCredit"),
|
|
@@ -1252,13 +1282,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1252
1282
|
"helper-state": e(G)(e(d), "credit.normal"),
|
|
1253
1283
|
"helper-text": e(X)(e(d), "credit.normal")
|
|
1254
1284
|
}, {
|
|
1255
|
-
append:
|
|
1256
|
-
|
|
1285
|
+
append: B(() => [...n[23] || (n[23] = [
|
|
1286
|
+
me(" credit ", -1)
|
|
1257
1287
|
])]),
|
|
1258
1288
|
_: 1
|
|
1259
1289
|
}, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1260
|
-
r(
|
|
1261
|
-
"model-value": ((
|
|
1290
|
+
r(U, {
|
|
1291
|
+
"model-value": ((Re = e(t).credit.free) == null ? void 0 : Re.amount) ?? null,
|
|
1262
1292
|
min: 0,
|
|
1263
1293
|
"onUpdate:modelValue": n[9] || (n[9] = (P) => {
|
|
1264
1294
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1271,15 +1301,15 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1271
1301
|
"helper-state": e(G)(e(d), "credit.free.amount"),
|
|
1272
1302
|
"helper-text": e(X)(e(d), "credit.free.amount")
|
|
1273
1303
|
}, {
|
|
1274
|
-
append:
|
|
1275
|
-
|
|
1304
|
+
append: B(() => [...n[24] || (n[24] = [
|
|
1305
|
+
me(" credit ", -1)
|
|
1276
1306
|
])]),
|
|
1277
1307
|
_: 1
|
|
1278
1308
|
}, 8, ["model-value", "label", "helper-state", "helper-text"]),
|
|
1279
|
-
(
|
|
1309
|
+
(Ie = e(t).credit.free) != null && Ie.amount ? (h(), M(U, {
|
|
1280
1310
|
key: 0,
|
|
1281
1311
|
disabled: !!e(t).stripePriceId,
|
|
1282
|
-
"model-value": ((
|
|
1312
|
+
"model-value": ((Be = e(t).credit.free) == null ? void 0 : Be.day) ?? null,
|
|
1283
1313
|
min: 0,
|
|
1284
1314
|
"onUpdate:modelValue": n[10] || (n[10] = (P) => {
|
|
1285
1315
|
e(t).credit.free || (e(t).credit.free = {
|
|
@@ -1292,8 +1322,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1292
1322
|
"helper-state": e(G)(e(d), "credit.free.day"),
|
|
1293
1323
|
"helper-text": e(X)(e(d), "credit.free.day")
|
|
1294
1324
|
}, {
|
|
1295
|
-
append:
|
|
1296
|
-
|
|
1325
|
+
append: B(() => [...n[25] || (n[25] = [
|
|
1326
|
+
me(" day(s) ", -1)
|
|
1297
1327
|
])]),
|
|
1298
1328
|
_: 1
|
|
1299
1329
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : E("", !0)
|
|
@@ -1304,13 +1334,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1304
1334
|
modelValue: e(t).taxes,
|
|
1305
1335
|
"onUpdate:modelValue": n[11] || (n[11] = (P) => e(t).taxes = P)
|
|
1306
1336
|
}, null, 8, ["modelValue"]),
|
|
1307
|
-
r(
|
|
1337
|
+
r(R, {
|
|
1308
1338
|
label: `Tax Charged (${e(oe)})`,
|
|
1309
|
-
"model-value": e(
|
|
1339
|
+
"model-value": e(ie),
|
|
1310
1340
|
disabled: ""
|
|
1311
1341
|
}, null, 8, ["label", "model-value"])
|
|
1312
1342
|
], 64)) : E("", !0),
|
|
1313
|
-
r(
|
|
1343
|
+
r(U, {
|
|
1314
1344
|
label: "Total Price",
|
|
1315
1345
|
"model-value": e(b),
|
|
1316
1346
|
disabled: !0
|
|
@@ -1322,7 +1352,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1322
1352
|
r(dt, {
|
|
1323
1353
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1324
1354
|
}, {
|
|
1325
|
-
default:
|
|
1355
|
+
default: B(() => [
|
|
1326
1356
|
r(q, {
|
|
1327
1357
|
onClick: n[12] || (n[12] = (P) => l.value = []),
|
|
1328
1358
|
label: "All"
|
|
@@ -1332,20 +1362,20 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1332
1362
|
{
|
|
1333
1363
|
id: "type",
|
|
1334
1364
|
value: "VOUCHER",
|
|
1335
|
-
name: e(
|
|
1365
|
+
name: e(fe).VOUCHER.name
|
|
1336
1366
|
}
|
|
1337
1367
|
]),
|
|
1338
|
-
label: e(
|
|
1368
|
+
label: e(fe).VOUCHER.name
|
|
1339
1369
|
}, null, 8, ["label"]),
|
|
1340
1370
|
r(q, {
|
|
1341
1371
|
onClick: n[14] || (n[14] = (P) => l.value = [
|
|
1342
1372
|
{
|
|
1343
1373
|
id: "type",
|
|
1344
1374
|
value: "TITLE",
|
|
1345
|
-
name: e(
|
|
1375
|
+
name: e(fe).TITLE.name
|
|
1346
1376
|
}
|
|
1347
1377
|
]),
|
|
1348
|
-
label: e(
|
|
1378
|
+
label: e(fe).TITLE.name
|
|
1349
1379
|
}, null, 8, ["label"])
|
|
1350
1380
|
]),
|
|
1351
1381
|
_: 1
|
|
@@ -1353,7 +1383,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1353
1383
|
]),
|
|
1354
1384
|
r(J, {
|
|
1355
1385
|
modelValue: e(H),
|
|
1356
|
-
"onUpdate:modelValue": n[15] || (n[15] = (P) =>
|
|
1386
|
+
"onUpdate:modelValue": n[15] || (n[15] = (P) => re(H) ? H.value = P : null),
|
|
1357
1387
|
selection: "multiple",
|
|
1358
1388
|
"column-filter": e(l),
|
|
1359
1389
|
"column-defs": T,
|
|
@@ -1383,14 +1413,14 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1383
1413
|
sublabel: e(s)("connect.store.bundle.edit.hideInPosDescription")
|
|
1384
1414
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
1385
1415
|
], 64)),
|
|
1386
|
-
r(
|
|
1387
|
-
"model-value": ((De = (
|
|
1416
|
+
r(U, {
|
|
1417
|
+
"model-value": ((De = (Ne = e(t).config) == null ? void 0 : Ne.options) == null ? void 0 : De.maxPerUser) || null,
|
|
1388
1418
|
"onUpdate:modelValue": n[18] || (n[18] = (P) => e(ae).set(e(t), "config.options.maxPerUser", P)),
|
|
1389
1419
|
label: e(s)("connect.store.bundle.edit.maxPerUser"),
|
|
1390
1420
|
"show-steppers": !1,
|
|
1391
1421
|
placeholder: e(s)("connect.store.bundle.edit.unlimited")
|
|
1392
1422
|
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
1393
|
-
r(
|
|
1423
|
+
r(U, {
|
|
1394
1424
|
"model-value": ((Oe = (Me = e(t).config) == null ? void 0 : Me.options) == null ? void 0 : Oe.maxReceive) || null,
|
|
1395
1425
|
"onUpdate:modelValue": n[19] || (n[19] = (P) => e(ae).set(e(t), "config.options.maxReceive", P)),
|
|
1396
1426
|
label: e(s)("connect.store.bundle.edit.maxReceive"),
|
|
@@ -1409,8 +1439,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1409
1439
|
__name: "SendBundleSheet",
|
|
1410
1440
|
emits: ["success"],
|
|
1411
1441
|
setup(x, { expose: S, emit: a }) {
|
|
1412
|
-
const { minor: g } = Le, s =
|
|
1413
|
-
|
|
1442
|
+
const { minor: g } = Le, s = N(), v = N(""), o = N(""), c = N([]), i = N(!1), t = N();
|
|
1443
|
+
N(!0);
|
|
1414
1444
|
function u(w) {
|
|
1415
1445
|
i.value = !0, v.value = null, o.value = "", s.value = w.bundle;
|
|
1416
1446
|
}
|
|
@@ -1435,7 +1465,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1435
1465
|
const w = c.value.find(
|
|
1436
1466
|
(j) => j.value === v.value
|
|
1437
1467
|
);
|
|
1438
|
-
await
|
|
1468
|
+
await ge.confirm(
|
|
1439
1469
|
`Are you sure you want to send bundle ${s.value.name} to ${w == null ? void 0 : w.label}?`,
|
|
1440
1470
|
"Confirm",
|
|
1441
1471
|
"Confirm",
|
|
@@ -1449,7 +1479,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1449
1479
|
ref: `ADMIN:${(/* @__PURE__ */ new Date()).toISOString()}:${o.value}`,
|
|
1450
1480
|
withCoin: !1
|
|
1451
1481
|
};
|
|
1452
|
-
await
|
|
1482
|
+
await be.sendBundle(j), f();
|
|
1453
1483
|
},
|
|
1454
1484
|
{
|
|
1455
1485
|
message: "Sending bundle",
|
|
@@ -1467,21 +1497,21 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1467
1497
|
return S({
|
|
1468
1498
|
showSheet: u,
|
|
1469
1499
|
hideSheet: f
|
|
1470
|
-
}),
|
|
1500
|
+
}), he(async () => {
|
|
1471
1501
|
await d("");
|
|
1472
1502
|
}), (w, $) => {
|
|
1473
|
-
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"),
|
|
1503
|
+
const j = _("FmCardMedia"), ne = _("FmCardHeader"), Z = _("FmChip"), H = _("FmCardSection"), z = _("FmCard"), oe = _("FmSelect"), F = _("FmTextField"), ie = _("FmForm"), b = _("FmButton"), k = _("FmSideSheet");
|
|
1474
1504
|
return h(), M(k, {
|
|
1475
1505
|
"max-width": 560,
|
|
1476
1506
|
"dismiss-away": !0,
|
|
1477
1507
|
header: "Send bundle to member",
|
|
1478
1508
|
modelValue: e(i),
|
|
1479
1509
|
"onUpdate:modelValue": [
|
|
1480
|
-
$[4] || ($[4] = (C) =>
|
|
1510
|
+
$[4] || ($[4] = (C) => re(i) ? i.value = C : null),
|
|
1481
1511
|
$[5] || ($[5] = (C) => i.value = C)
|
|
1482
1512
|
]
|
|
1483
1513
|
}, {
|
|
1484
|
-
"side-sheet-footer":
|
|
1514
|
+
"side-sheet-footer": B(() => [
|
|
1485
1515
|
V("div", fn, [
|
|
1486
1516
|
r(b, {
|
|
1487
1517
|
label: "Send",
|
|
@@ -1499,30 +1529,30 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1499
1529
|
})
|
|
1500
1530
|
])
|
|
1501
1531
|
]),
|
|
1502
|
-
default:
|
|
1503
|
-
r(
|
|
1532
|
+
default: B(() => [
|
|
1533
|
+
r(ie, {
|
|
1504
1534
|
class: "space-y-16",
|
|
1505
1535
|
ref_key: "form",
|
|
1506
1536
|
ref: t,
|
|
1507
1537
|
onValidationSuccess: T,
|
|
1508
1538
|
blameFormChildOnValidationFailed: ""
|
|
1509
1539
|
}, {
|
|
1510
|
-
default:
|
|
1540
|
+
default: B(() => [
|
|
1511
1541
|
r(z, {
|
|
1512
1542
|
class: "max-w-[700px]",
|
|
1513
1543
|
horizontal: "",
|
|
1514
1544
|
variant: "outlined"
|
|
1515
1545
|
}, {
|
|
1516
|
-
default:
|
|
1517
|
-
var C,
|
|
1546
|
+
default: B(() => {
|
|
1547
|
+
var C, I;
|
|
1518
1548
|
return [
|
|
1519
1549
|
(C = e(s)) != null && C.image ? (h(), M(j, {
|
|
1520
1550
|
key: 0,
|
|
1521
1551
|
width: "100",
|
|
1522
|
-
src: (
|
|
1552
|
+
src: (I = e(s)) == null ? void 0 : I.image
|
|
1523
1553
|
}, null, 8, ["src"])) : E("", !0),
|
|
1524
1554
|
r(H, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1525
|
-
default:
|
|
1555
|
+
default: B(() => {
|
|
1526
1556
|
var m;
|
|
1527
1557
|
return [
|
|
1528
1558
|
r(ne, {
|
|
@@ -1531,8 +1561,8 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1531
1561
|
subtitle: e(l)
|
|
1532
1562
|
}, null, 8, ["title", "subtitle"]),
|
|
1533
1563
|
r(H, { class: "p-0" }, {
|
|
1534
|
-
default:
|
|
1535
|
-
var n, p, y,
|
|
1564
|
+
default: B(() => {
|
|
1565
|
+
var n, p, y, R, O, U, q, J, pe, Ce, de;
|
|
1536
1566
|
return [
|
|
1537
1567
|
V("div", pn, [
|
|
1538
1568
|
(n = e(s)) != null && n.isFeedvibe ? (h(), M(Z, {
|
|
@@ -1543,13 +1573,13 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1543
1573
|
key: 1,
|
|
1544
1574
|
label: `${e(s).titles.length} title(s)`
|
|
1545
1575
|
}, null, 8, ["label"])) : E("", !0),
|
|
1546
|
-
(O = (
|
|
1576
|
+
(O = (R = e(s)) == null ? void 0 : R.vouchers) != null && O.length ? (h(), M(Z, {
|
|
1547
1577
|
key: 2,
|
|
1548
1578
|
label: `${e(s).vouchers.length} voucher(s)`
|
|
1549
1579
|
}, null, 8, ["label"])) : E("", !0),
|
|
1550
|
-
(q = (
|
|
1580
|
+
(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, {
|
|
1551
1581
|
key: 3,
|
|
1552
|
-
label: `${(e(s).credit.normal || 0) + (((
|
|
1582
|
+
label: `${(e(s).credit.normal || 0) + (((de = e(s).credit.free) == null ? void 0 : de.amount) || 0)} credit(s)`
|
|
1553
1583
|
}, null, 8, ["label"])) : E("", !0)
|
|
1554
1584
|
])
|
|
1555
1585
|
];
|
|
@@ -1566,7 +1596,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1566
1596
|
}),
|
|
1567
1597
|
r(oe, {
|
|
1568
1598
|
modelValue: e(v),
|
|
1569
|
-
"onUpdate:modelValue": $[0] || ($[0] = (C) =>
|
|
1599
|
+
"onUpdate:modelValue": $[0] || ($[0] = (C) => re(v) ? v.value = C : null),
|
|
1570
1600
|
label: "Select member",
|
|
1571
1601
|
searchable: "",
|
|
1572
1602
|
items: e(c),
|
|
@@ -1576,7 +1606,7 @@ const Zt = /* @__PURE__ */ te({
|
|
|
1576
1606
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
1577
1607
|
r(F, {
|
|
1578
1608
|
modelValue: e(o),
|
|
1579
|
-
"onUpdate:modelValue": $[1] || ($[1] = (C) =>
|
|
1609
|
+
"onUpdate:modelValue": $[1] || ($[1] = (C) => re(o) ? o.value = C : null),
|
|
1580
1610
|
label: "Reference (optional)",
|
|
1581
1611
|
rules: [
|
|
1582
1612
|
(C) => C.length < 50 || "Reference must be less than 50 characters"
|
|
@@ -1599,7 +1629,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1599
1629
|
label: "Setup payout account",
|
|
1600
1630
|
value: "payout",
|
|
1601
1631
|
isPrimary: !1
|
|
1602
|
-
}, { t: a } =
|
|
1632
|
+
}, { t: a } = xe(), g = {
|
|
1603
1633
|
label: a("connect.store.actions.setting"),
|
|
1604
1634
|
value: "setting",
|
|
1605
1635
|
isPrimary: !1
|
|
@@ -1611,73 +1641,73 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1611
1641
|
value: "create_category",
|
|
1612
1642
|
isPrimary: !0,
|
|
1613
1643
|
prependIcon: "add"
|
|
1614
|
-
}, o =
|
|
1644
|
+
}, 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();
|
|
1615
1645
|
async function $(b) {
|
|
1616
1646
|
var k;
|
|
1617
1647
|
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");
|
|
1618
1648
|
}
|
|
1619
1649
|
function j(b, k) {
|
|
1620
1650
|
var p;
|
|
1621
|
-
const C = !!((p = k.company) != null && p.sstRegNo),
|
|
1651
|
+
const C = !!((p = k.company) != null && p.sstRegNo), I = k.inclusiveTaxes ?? [], m = W.taxSystem.map((y) => y.code), n = C ? I.flatMap((y) => {
|
|
1622
1652
|
console.log(y, "inclusive tax");
|
|
1623
|
-
const
|
|
1624
|
-
return
|
|
1653
|
+
const R = W.systemDefaultCode(y.systemCode);
|
|
1654
|
+
return R ? [{ systemCode: y.systemCode, taxCode: R.taxCode }] : [];
|
|
1625
1655
|
}) : [];
|
|
1626
1656
|
return console.log([
|
|
1627
1657
|
["hasSstRegNo", C],
|
|
1628
1658
|
["defaultTaxCodes", n],
|
|
1629
|
-
["inclusiveTaxes",
|
|
1659
|
+
["inclusiveTaxes", I],
|
|
1630
1660
|
["taxSystemCodes", m]
|
|
1631
1661
|
]), b.map((y) => ({
|
|
1632
1662
|
...y,
|
|
1633
|
-
bundles: y.bundles.map((
|
|
1634
|
-
const { pf_vouchers: O, ...
|
|
1663
|
+
bundles: y.bundles.map((R) => {
|
|
1664
|
+
const { pf_vouchers: O, ...U } = R;
|
|
1635
1665
|
if (!C)
|
|
1636
1666
|
return {
|
|
1637
|
-
...
|
|
1667
|
+
...U,
|
|
1638
1668
|
taxes: [],
|
|
1639
1669
|
taxTotals: [],
|
|
1640
|
-
priceWithTaxes: { ...
|
|
1670
|
+
priceWithTaxes: { ...U.price }
|
|
1641
1671
|
};
|
|
1642
1672
|
const q = n, J = He(
|
|
1643
1673
|
W.fullTax,
|
|
1644
1674
|
q,
|
|
1645
|
-
|
|
1646
|
-
Number(
|
|
1647
|
-
|
|
1675
|
+
U.price,
|
|
1676
|
+
Number(U.credit.normal),
|
|
1677
|
+
I,
|
|
1648
1678
|
m
|
|
1649
1679
|
);
|
|
1650
1680
|
return {
|
|
1651
|
-
...
|
|
1681
|
+
...U,
|
|
1652
1682
|
taxes: q,
|
|
1653
1683
|
taxTotals: J,
|
|
1654
1684
|
priceWithTaxes: qe(
|
|
1655
1685
|
J,
|
|
1656
|
-
|
|
1657
|
-
|
|
1686
|
+
U.price,
|
|
1687
|
+
I
|
|
1658
1688
|
)
|
|
1659
1689
|
};
|
|
1660
1690
|
})
|
|
1661
1691
|
}));
|
|
1662
1692
|
}
|
|
1663
1693
|
async function ne(b, k, C) {
|
|
1664
|
-
const
|
|
1694
|
+
const I = !C && !!k, m = !!C && !k;
|
|
1665
1695
|
let n;
|
|
1666
|
-
if (
|
|
1667
|
-
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0,
|
|
1696
|
+
if (I) {
|
|
1697
|
+
const y = W.taxSystem[0] ? W.systemDefaultCode(W.taxSystem[0].code) : void 0, R = y ? `${y.name} (${y.taxCode})` : a("connect.store.taxPropagation.defaultTax");
|
|
1668
1698
|
n = a("connect.store.taxPropagation.addConfirm", {
|
|
1669
|
-
taxCode:
|
|
1699
|
+
taxCode: R
|
|
1670
1700
|
});
|
|
1671
1701
|
} else m ? n = a("connect.store.taxPropagation.removeConfirm") : n = a("connect.store.taxPropagation.updateConfirm");
|
|
1672
|
-
await
|
|
1702
|
+
await ge.confirm(
|
|
1673
1703
|
n,
|
|
1674
1704
|
a("connect.store.taxPropagation.title"),
|
|
1675
1705
|
a("connect.store.taxPropagation.confirm"),
|
|
1676
1706
|
a("connect.common.cancel")
|
|
1677
1707
|
) && await u(
|
|
1678
1708
|
async () => {
|
|
1679
|
-
const y = Fe(i.sortedStoreCategories),
|
|
1680
|
-
await
|
|
1709
|
+
const y = Fe(i.sortedStoreCategories), R = j(y, b);
|
|
1710
|
+
await be.updateStoreBundle({ categories: R }), await i.readMemberStore(), await i.readMembership(), await i.readRewards();
|
|
1681
1711
|
},
|
|
1682
1712
|
{
|
|
1683
1713
|
message: a("connect.store.taxPropagation.updating"),
|
|
@@ -1686,31 +1716,31 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1686
1716
|
);
|
|
1687
1717
|
}
|
|
1688
1718
|
async function Z(b) {
|
|
1689
|
-
var
|
|
1690
|
-
const k = ((O = (
|
|
1691
|
-
((
|
|
1692
|
-
),
|
|
1719
|
+
var R, O, U, q;
|
|
1720
|
+
const k = ((O = (R = i.storeOption) == null ? void 0 : R.company) == null ? void 0 : O.sstRegNo) ?? "", C = ae.cloneDeep(
|
|
1721
|
+
((U = i.storeOption) == null ? void 0 : U.inclusiveTaxes) ?? []
|
|
1722
|
+
), I = ((q = b.company) == null ? void 0 : q.sstRegNo) ?? "";
|
|
1693
1723
|
await u(
|
|
1694
1724
|
async () => {
|
|
1695
1725
|
var J;
|
|
1696
|
-
await
|
|
1726
|
+
await be.updateStore(b), await i.readMemberStore(), (J = l.value) == null || J.showSheet(!1);
|
|
1697
1727
|
},
|
|
1698
1728
|
{
|
|
1699
1729
|
message: a("connect.store.setting.update.message"),
|
|
1700
1730
|
successMessage: a("connect.store.setting.update.success")
|
|
1701
1731
|
}
|
|
1702
1732
|
);
|
|
1703
|
-
const m = k !==
|
|
1733
|
+
const m = k !== I, n = !ae.isEqual(
|
|
1704
1734
|
C,
|
|
1705
1735
|
b.inclusiveTaxes ?? []
|
|
1706
1736
|
);
|
|
1707
1737
|
!(m || n) || i.sortedStoreCategories.flatMap(
|
|
1708
1738
|
(J) => J.bundles
|
|
1709
|
-
).length === 0 || await ne(b,
|
|
1739
|
+
).length === 0 || await ne(b, I, k);
|
|
1710
1740
|
}
|
|
1711
1741
|
async function H(b = -1) {
|
|
1712
1742
|
var k, C;
|
|
1713
|
-
if ((!i.storeOption || !i.storeOption.company) && await
|
|
1743
|
+
if ((!i.storeOption || !i.storeOption.company) && await ge.confirm(
|
|
1714
1744
|
a("connect.store.category.setup.title"),
|
|
1715
1745
|
a("connect.store.category.setup.button"),
|
|
1716
1746
|
a("connect.store.category.setup.action"),
|
|
@@ -1724,39 +1754,39 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1724
1754
|
initialValue: ((C = d.value[b]) == null ? void 0 : C.name) ?? "",
|
|
1725
1755
|
action: b == -1 ? "add" : "edit"
|
|
1726
1756
|
}
|
|
1727
|
-
}).onPrimary(async (
|
|
1728
|
-
|
|
1757
|
+
}).onPrimary(async (I) => {
|
|
1758
|
+
I === null && !await ge.remove(
|
|
1729
1759
|
a("connect.store.category.remove.confirm"),
|
|
1730
1760
|
a("connect.store.category.remove.title")
|
|
1731
1761
|
) || await u(
|
|
1732
1762
|
async () => {
|
|
1733
|
-
const m = b == -1 ? [...d.value, { name:
|
|
1734
|
-
await
|
|
1763
|
+
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);
|
|
1764
|
+
await be.updateStoreBundle({
|
|
1735
1765
|
categories: m
|
|
1736
1766
|
}), await i.readMemberStore();
|
|
1737
1767
|
},
|
|
1738
1768
|
{
|
|
1739
|
-
message:
|
|
1740
|
-
successMessage:
|
|
1769
|
+
message: I === null ? a("connect.store.category.update.deleting") : b == -1 ? a("connect.store.category.update.creating") : a("connect.store.category.update.updating"),
|
|
1770
|
+
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")
|
|
1741
1771
|
}
|
|
1742
1772
|
);
|
|
1743
1773
|
});
|
|
1744
1774
|
}
|
|
1745
|
-
async function z(b, k, C,
|
|
1746
|
-
var p, y,
|
|
1747
|
-
k ?? (k = (p = w.value) == null ? void 0 : p.target.category), C ?? (C = (y = w.value) == null ? void 0 : y.target.index),
|
|
1775
|
+
async function z(b, k, C, I) {
|
|
1776
|
+
var p, y, R;
|
|
1777
|
+
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);
|
|
1748
1778
|
const m = Fe(d.value);
|
|
1749
1779
|
for (const O of m)
|
|
1750
|
-
for (const
|
|
1751
|
-
console.log(
|
|
1752
|
-
k !=
|
|
1780
|
+
for (const U of O.bundles)
|
|
1781
|
+
console.log(U, "bundle in payload"), "pf_vouchers" in U && delete U.pf_vouchers;
|
|
1782
|
+
k != I && I != null && (m[I].bundles.splice(C, 1), C = m[k].bundles.length);
|
|
1753
1783
|
const n = m[k];
|
|
1754
1784
|
if (!n) {
|
|
1755
1785
|
st.error("Unexpected error", 2e3);
|
|
1756
1786
|
return;
|
|
1757
1787
|
}
|
|
1758
1788
|
if (b == null) {
|
|
1759
|
-
if (await
|
|
1789
|
+
if (await ge.remove(
|
|
1760
1790
|
a("connect.store.bundle.delete.confirm"),
|
|
1761
1791
|
a("connect.store.bundle.delete.title")
|
|
1762
1792
|
) == !1)
|
|
@@ -1766,7 +1796,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1766
1796
|
C == -1 ? n.bundles.push(b) : n.bundles[C] = b;
|
|
1767
1797
|
await u(
|
|
1768
1798
|
async () => {
|
|
1769
|
-
var O,
|
|
1799
|
+
var O, U;
|
|
1770
1800
|
if (b != null) {
|
|
1771
1801
|
const q = (O = w.value) == null ? void 0 : O.bundleImage;
|
|
1772
1802
|
q === null && b.image ? (await Ve.delete(b.image), b.image = null) : q && (b.image = await Ve.update(
|
|
@@ -1774,9 +1804,9 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1774
1804
|
q
|
|
1775
1805
|
));
|
|
1776
1806
|
}
|
|
1777
|
-
await
|
|
1807
|
+
await be.updateStoreBundle({
|
|
1778
1808
|
categories: m
|
|
1779
|
-
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (
|
|
1809
|
+
}), await i.readMemberStore(), await i.readMembership(), await i.readRewards(), (U = w.value) == null || U.showSheet(!1);
|
|
1780
1810
|
},
|
|
1781
1811
|
{
|
|
1782
1812
|
message: `${b == null ? "Deleting" : C == -1 ? "Creating" : "Updating"} bundle`,
|
|
@@ -1791,18 +1821,18 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1791
1821
|
bundle: b.bundle ? Fe(b.bundle) : void 0
|
|
1792
1822
|
});
|
|
1793
1823
|
}
|
|
1794
|
-
const F =
|
|
1795
|
-
function
|
|
1824
|
+
const F = N([]);
|
|
1825
|
+
function ie(b) {
|
|
1796
1826
|
var k;
|
|
1797
1827
|
(k = o.value) == null || k.showSheet({
|
|
1798
1828
|
bundle: b
|
|
1799
1829
|
});
|
|
1800
1830
|
}
|
|
1801
|
-
return
|
|
1831
|
+
return he(async () => {
|
|
1802
1832
|
var k, C;
|
|
1803
1833
|
await t(async () => {
|
|
1804
|
-
var
|
|
1805
|
-
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (
|
|
1834
|
+
var I, m;
|
|
1835
|
+
if (await i.readMemberStore(), await i.readMembership(), await i.readRewards(), await i.readPayoutAccount(), (I = c.currentRoute.value.query) != null && I.action) {
|
|
1806
1836
|
switch ((m = c.currentRoute.value.query) == null ? void 0 : m.action) {
|
|
1807
1837
|
case "update_setting":
|
|
1808
1838
|
$("setting");
|
|
@@ -1813,7 +1843,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1813
1843
|
case "create_feedvibe_bundle":
|
|
1814
1844
|
f.open({
|
|
1815
1845
|
title: "Select category",
|
|
1816
|
-
contentComponent:
|
|
1846
|
+
contentComponent: Rt
|
|
1817
1847
|
}).onPrimary((n) => {
|
|
1818
1848
|
f.close(), oe({
|
|
1819
1849
|
categories: T.value,
|
|
@@ -1842,7 +1872,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1842
1872
|
v
|
|
1843
1873
|
];
|
|
1844
1874
|
}), (b, k) => {
|
|
1845
|
-
const C = _("FmPageHead"),
|
|
1875
|
+
const C = _("FmPageHead"), I = _("FmButton"), m = _("FmCard");
|
|
1846
1876
|
return h(), D(Y, null, [
|
|
1847
1877
|
r(C, {
|
|
1848
1878
|
title: e(a)("connect.store.title"),
|
|
@@ -1851,14 +1881,14 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1851
1881
|
}, null, 8, ["title", "actions"]),
|
|
1852
1882
|
V("div", gn, [
|
|
1853
1883
|
e(d) && e(d).length > 0 ? (h(), D(Y, { key: 0 }, [
|
|
1854
|
-
(h(!0), D(Y, null,
|
|
1884
|
+
(h(!0), D(Y, null, ce(e(d), (n, p) => (h(), D("div", {
|
|
1855
1885
|
key: n.name,
|
|
1856
1886
|
class: "space-y-8 py-12"
|
|
1857
1887
|
}, [
|
|
1858
1888
|
V("div", vn, [
|
|
1859
1889
|
V("div", hn, K(n.name), 1),
|
|
1860
1890
|
r(ke, { json: n }, null, 8, ["json"]),
|
|
1861
|
-
r(
|
|
1891
|
+
r(I, {
|
|
1862
1892
|
icon: "edit",
|
|
1863
1893
|
size: "md",
|
|
1864
1894
|
variant: "tertiary",
|
|
@@ -1866,17 +1896,17 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1866
1896
|
}, null, 8, ["onClick"])
|
|
1867
1897
|
]),
|
|
1868
1898
|
V("div", xn, [
|
|
1869
|
-
(h(!0), D(Y, null,
|
|
1899
|
+
(h(!0), D(Y, null, ce(n.bundles, (y, R) => (h(), M(Ft, {
|
|
1870
1900
|
bundle: y,
|
|
1871
1901
|
key: y._id,
|
|
1872
1902
|
onEdit: (O) => oe({
|
|
1873
1903
|
bundle: y,
|
|
1874
1904
|
category: p,
|
|
1875
|
-
index:
|
|
1905
|
+
index: R,
|
|
1876
1906
|
categories: e(T)
|
|
1877
1907
|
}),
|
|
1878
|
-
onDelete: (O) => z(null, p,
|
|
1879
|
-
onSend:
|
|
1908
|
+
onDelete: (O) => z(null, p, R),
|
|
1909
|
+
onSend: ie
|
|
1880
1910
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1881
1911
|
r(Vt, {
|
|
1882
1912
|
onCreate: (y) => oe({
|
|
@@ -1897,7 +1927,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1897
1927
|
variant: "outlined",
|
|
1898
1928
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1899
1929
|
}, {
|
|
1900
|
-
default:
|
|
1930
|
+
default: B(() => [
|
|
1901
1931
|
k[1] || (k[1] = V("img", {
|
|
1902
1932
|
src: Ge,
|
|
1903
1933
|
class: "aspect-square w-[150px]"
|
|
@@ -1906,7 +1936,7 @@ const gn = { class: "px-24 flex flex-col gap-y-16" }, vn = { class: "flex gap-8
|
|
|
1906
1936
|
V("div", _n, K(e(a)("connect.store.bundle.title")), 1),
|
|
1907
1937
|
V("div", Sn, K(e(a)("connect.store.bundle.description")), 1)
|
|
1908
1938
|
]),
|
|
1909
|
-
r(
|
|
1939
|
+
r(I, {
|
|
1910
1940
|
variant: "primary",
|
|
1911
1941
|
label: e(a)("connect.store.actions.addCategory"),
|
|
1912
1942
|
icon: "add",
|