@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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/README.md +1 -66
- package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
- package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
- package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
- package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
- package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
- package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
- package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
- package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
- package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
- package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
- package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
- package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
- package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
- package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
- package/dist/Marketing-BKK45Eve.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
- package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
- package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
- package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
- package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
- package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
- package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
- package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
- package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
- package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
- package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
- package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
- package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
- package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
- package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
- package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
- package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
- package/dist/Setting-BnFRI0Se.js +2037 -0
- package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
- package/dist/Settings-BvT8_tkQ.js +179 -0
- package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
- package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
- package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
- package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
- package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
- package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
- package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
- package/dist/app.js +3 -4
- package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
- package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
- package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
- package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
- package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
- package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
- package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
- package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
- package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
- package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
- package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
- package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
- package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
- package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
- package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
- package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
- package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
- package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
- package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
- package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
- package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
- package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
- package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
- package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
- package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
- package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
- package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
- package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
- package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
- package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
- package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
- package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
- package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
- package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
- package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
- package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
- package/dist/objectid-DEMM_jdR.js +145 -0
- package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
- package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
- package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
- package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
- package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
- package/dist/rule-builder-Deufb6h_.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DeebIqJ_.js +236 -0
- package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
- package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
- package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
- package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
- package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
- package/dist/vue-i18n-Cze706-f.js +2365 -0
- package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
- package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BPpdm96t.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
- package/dist/Grab-BWzdN_cd.js +0 -301
- package/dist/MainLayout-DwnjGXh6.js +0 -4
- package/dist/Marketing-DCco__2F.js +0 -273
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
- package/dist/Setting-CDM4RhLW.js +0 -574
- package/dist/Settings-D-0tvZRr.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
- package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
- package/dist/WhatsappBot-Cl64wG_F.js +0 -876
- package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
- package/dist/WhatsappLayout-C639d2HP.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
- package/dist/feature-flag-Bo-k5sIG.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-DQ8JJhxs.js +0 -74
- package/dist/objectid-C-wocWKI.js +0 -145
- package/dist/template-BZyFhr73.js +0 -188
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
- package/dist/vue-i18n-DWGiC_vs.js +0 -2365
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { p as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { g as
|
|
10
|
-
import { c as he, p as _e } from "./
|
|
11
|
-
import { e as
|
|
12
|
-
import { c as
|
|
13
|
-
import "./index-
|
|
14
|
-
import { _ as we } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { c as g } from "./index-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
1
|
+
import { defineComponent as H, ref as b, resolveComponent as p, openBlock as y, createBlock as T, unref as a, isRef as ae, withCtx as V, createElementVNode as r, createVNode as s, computed as ie, h as O, onMounted as se, createElementBlock as A, Fragment as L, renderList as re, resolveDynamicComponent as le, toDisplayString as P } from "vue";
|
|
2
|
+
import { _ as ce } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as me, components as M } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as D } from "./plugins-DQNOWwRC.js";
|
|
5
|
+
import { u as ue } from "./loading-BvHm1m3K.js";
|
|
6
|
+
import { u as pe } from "./business-Ce8vq3wQ.js";
|
|
7
|
+
import { u as de } from "./campaign-BTllt2LH.js";
|
|
8
|
+
import { u as fe } from "./vue-i18n-Cze706-f.js";
|
|
9
|
+
import { g as ye, a as q } from "./campaign-C19If7bW.js";
|
|
10
|
+
import { u as ge, c as he, p as _e } from "./template-DeebIqJ_.js";
|
|
11
|
+
import { e as K } from "./effect-Dx3zfl28.js";
|
|
12
|
+
import { c as E } from "./string-Gcy5IM_H.js";
|
|
13
|
+
import "./index-B8meeQoD.js";
|
|
14
|
+
import { _ as we } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js";
|
|
15
|
+
import { c as g } from "./index-649OZ_e1.js";
|
|
16
|
+
import { _ as Q } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
17
|
+
import { u as ve } from "./onboardingSetup-lTaJc0oT.js";
|
|
18
|
+
import { useRouter as be } from "vue-router";
|
|
19
|
+
import { R as Ce } from "./app-DdNKsn2Q.js";
|
|
20
|
+
const Se = { class: "space-y-8" }, ke = /* @__PURE__ */ H({
|
|
22
21
|
__name: "QueueSheet",
|
|
23
22
|
emits: ["update:model-value"],
|
|
24
|
-
setup(
|
|
25
|
-
const d =
|
|
23
|
+
setup(z, { expose: n, emit: B }) {
|
|
24
|
+
const d = b(!1), w = b([]);
|
|
26
25
|
async function I() {
|
|
27
26
|
d.value = !0;
|
|
28
|
-
const
|
|
29
|
-
console.log(
|
|
27
|
+
const i = await g.getPromotionQueue();
|
|
28
|
+
console.log(i, "jobs"), w.value = i;
|
|
30
29
|
}
|
|
31
|
-
const
|
|
30
|
+
const C = [
|
|
32
31
|
{
|
|
33
32
|
header: "Started At",
|
|
34
|
-
accessorFn: (
|
|
33
|
+
accessorFn: (i) => i.createdAt,
|
|
35
34
|
enableSorting: !0
|
|
36
35
|
},
|
|
37
36
|
{
|
|
38
37
|
header: "Campaigns",
|
|
39
|
-
accessorFn: (
|
|
38
|
+
accessorFn: (i) => i.campaigns
|
|
40
39
|
// cell(props) {
|
|
41
40
|
// const r = props.row.original;
|
|
42
41
|
// return h('div', {
|
|
@@ -47,27 +46,27 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
47
46
|
];
|
|
48
47
|
return n({
|
|
49
48
|
showSheet: I
|
|
50
|
-
}), (
|
|
49
|
+
}), (i, u) => {
|
|
51
50
|
const v = p("FmTable"), R = p("FmSideSheet");
|
|
52
51
|
return y(), T(R, {
|
|
53
52
|
"max-width": 550,
|
|
54
53
|
header: "Promotion Sync Queue",
|
|
55
54
|
modelValue: a(d),
|
|
56
55
|
"onUpdate:modelValue": [
|
|
57
|
-
u[1] || (u[1] = (f) =>
|
|
56
|
+
u[1] || (u[1] = (f) => ae(d) ? d.value = f : null),
|
|
58
57
|
u[2] || (u[2] = (f) => d.value = f)
|
|
59
58
|
]
|
|
60
59
|
}, {
|
|
61
60
|
default: V(() => [
|
|
62
|
-
|
|
63
|
-
u[3] || (u[3] =
|
|
64
|
-
|
|
65
|
-
modelValue:
|
|
66
|
-
"onUpdate:modelValue": u[0] || (u[0] = (f) =>
|
|
67
|
-
"column-filter":
|
|
68
|
-
"column-defs":
|
|
69
|
-
"row-data": a(
|
|
70
|
-
"hide-footer": a(
|
|
61
|
+
r("div", Se, [
|
|
62
|
+
u[3] || (u[3] = r("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Promotion synchronizing to your restaurant(s) is queued here. Depending on the number of campaigns and restaurants, this process may take several minutes. No task displayed here means there are no pending promotions to sync. ", -1)),
|
|
63
|
+
s(v, {
|
|
64
|
+
modelValue: i.tableRef,
|
|
65
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => i.tableRef = f),
|
|
66
|
+
"column-filter": i.jobFilters,
|
|
67
|
+
"column-defs": C,
|
|
68
|
+
"row-data": a(w),
|
|
69
|
+
"hide-footer": a(w).length <= 10
|
|
71
70
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
|
|
72
71
|
])
|
|
73
72
|
]),
|
|
@@ -75,10 +74,10 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
75
74
|
}, 8, ["modelValue"]);
|
|
76
75
|
};
|
|
77
76
|
}
|
|
78
|
-
}),
|
|
77
|
+
}), xe = { class: "px-24 flex flex-col gap-y-16" }, Fe = { class: "flex items-center justify-between w-full" }, Oe = { class: "flex gap-8 overflow-x-auto" }, Pe = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Ve = { class: "space-y-4" }, Ie = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = { class: "flex items-center gap-8" }, Le = { class: "flex flex-col gap-16 text-center" }, Me = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ H({
|
|
79
78
|
__name: "Promotion",
|
|
80
|
-
setup(
|
|
81
|
-
const { t: n } =
|
|
79
|
+
setup(z) {
|
|
80
|
+
const { t: n } = fe(), B = {
|
|
82
81
|
label: n("connect.promotion.createCampaign"),
|
|
83
82
|
value: "create",
|
|
84
83
|
isPrimary: !0,
|
|
@@ -88,12 +87,12 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
88
87
|
value: "sync",
|
|
89
88
|
isPrimary: !1,
|
|
90
89
|
prependIcon: "refresh"
|
|
91
|
-
},
|
|
90
|
+
}, w = {
|
|
92
91
|
label: "Queue",
|
|
93
92
|
value: "queue",
|
|
94
93
|
isPrimary: !1,
|
|
95
94
|
prependIcon: "work_history"
|
|
96
|
-
}, I =
|
|
95
|
+
}, I = ge("PROMOTION", me()), C = pe(), i = de(), { global: u, minor: v } = ue, R = be(), f = [
|
|
97
96
|
{
|
|
98
97
|
label: "Bill promotion",
|
|
99
98
|
value: "BILL"
|
|
@@ -102,91 +101,87 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
102
101
|
label: "Item promotion",
|
|
103
102
|
value: "ITEM"
|
|
104
103
|
}
|
|
105
|
-
], c =
|
|
104
|
+
], c = b({
|
|
106
105
|
searchKey: "",
|
|
107
106
|
location: [],
|
|
108
107
|
effectType: []
|
|
109
108
|
});
|
|
110
|
-
function
|
|
109
|
+
function G(e) {
|
|
111
110
|
const o = c.value.location;
|
|
112
111
|
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
|
|
113
112
|
var l;
|
|
114
113
|
return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
|
|
115
114
|
}) : e.targetLocation.includes(o);
|
|
116
115
|
}
|
|
117
|
-
function
|
|
118
|
-
var l,
|
|
116
|
+
function Y(e) {
|
|
117
|
+
var l, x;
|
|
119
118
|
const o = c.value.effectType;
|
|
120
119
|
if (!o || o.length === 0) return !0;
|
|
121
|
-
const m = (
|
|
120
|
+
const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
|
|
122
121
|
return o.includes(m);
|
|
123
122
|
}
|
|
124
|
-
const h =
|
|
125
|
-
() =>
|
|
126
|
-
(e) =>
|
|
123
|
+
const h = ie(
|
|
124
|
+
() => i.campaigns.promotion.filter(
|
|
125
|
+
(e) => G(e) && Y(e)
|
|
127
126
|
)
|
|
128
|
-
),
|
|
127
|
+
), J = [
|
|
129
128
|
{
|
|
130
129
|
header: n("connect.promotion.promotionTitle"),
|
|
131
130
|
accessorFn: (e) => e.name
|
|
132
131
|
},
|
|
133
|
-
{
|
|
134
|
-
header: n("connect.promotion.campaignDate"),
|
|
135
|
-
accessorFn: (e) => q(e)
|
|
136
|
-
},
|
|
137
132
|
{
|
|
138
133
|
header: n("connect.promotion.status"),
|
|
139
|
-
accessorFn: (e) =>
|
|
134
|
+
accessorFn: (e) => ye(e),
|
|
140
135
|
cell(e) {
|
|
141
|
-
return
|
|
136
|
+
return q(e.row.original);
|
|
142
137
|
}
|
|
143
138
|
},
|
|
144
139
|
{
|
|
145
140
|
header: n("connect.promotion.type"),
|
|
146
|
-
accessorFn: (e) => `${
|
|
141
|
+
accessorFn: (e) => `${E.title(e.effect.options.target)} promotion`
|
|
147
142
|
},
|
|
148
143
|
{
|
|
149
144
|
header: n("connect.promotion.summary"),
|
|
150
|
-
accessorFn: (e) =>
|
|
145
|
+
accessorFn: (e) => K(e.effect)
|
|
151
146
|
},
|
|
152
147
|
{
|
|
153
148
|
header: n("connect.promotion.actions"),
|
|
154
149
|
cell(e) {
|
|
155
|
-
return
|
|
156
|
-
|
|
150
|
+
return O("div", { class: "flex items-center gap-8 justify-end" }, [
|
|
151
|
+
O(M.FmButton, {
|
|
157
152
|
variant: "tertiary",
|
|
158
153
|
icon: "insights",
|
|
159
154
|
iconColor: "neutral-gray-400",
|
|
160
155
|
onClick: async (o) => {
|
|
161
|
-
o.stopPropagation(), await
|
|
156
|
+
o.stopPropagation(), await U(e.row.original);
|
|
162
157
|
}
|
|
163
158
|
}),
|
|
164
|
-
|
|
159
|
+
O(M.FmButton, {
|
|
165
160
|
variant: "tertiary",
|
|
166
161
|
icon: "content_copy",
|
|
167
162
|
iconColor: "neutral-gray-400",
|
|
168
163
|
onClick: async (o) => {
|
|
169
|
-
o.stopPropagation(), await
|
|
164
|
+
o.stopPropagation(), await j(e.row.original);
|
|
170
165
|
}
|
|
171
166
|
}),
|
|
172
|
-
|
|
167
|
+
O(M.FmButton, {
|
|
173
168
|
variant: "tertiary",
|
|
174
169
|
icon: "delete",
|
|
175
170
|
iconColor: "neutral-gray-400",
|
|
176
171
|
onClick: (o) => {
|
|
177
|
-
o.stopPropagation(),
|
|
172
|
+
o.stopPropagation(), $(e.row.original);
|
|
178
173
|
}
|
|
179
174
|
})
|
|
180
175
|
]);
|
|
181
176
|
}
|
|
182
177
|
}
|
|
183
|
-
],
|
|
184
|
-
async function
|
|
185
|
-
await
|
|
178
|
+
], S = b(), N = b();
|
|
179
|
+
async function $(e) {
|
|
180
|
+
await D.remove(
|
|
186
181
|
n("connect.promotion.confirmRemove", { name: e.name })
|
|
187
182
|
) && await v(
|
|
188
183
|
async () => {
|
|
189
|
-
await g.delete(e._id), await
|
|
184
|
+
await g.delete(e._id), await i.read("PROMOTION");
|
|
190
185
|
},
|
|
191
186
|
{
|
|
192
187
|
message: n("connect.promotion.removing", { name: e.name }),
|
|
@@ -196,13 +191,13 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
196
191
|
}
|
|
197
192
|
);
|
|
198
193
|
}
|
|
199
|
-
async function
|
|
194
|
+
async function k(e) {
|
|
200
195
|
e ? await o() : I.open(async (m) => {
|
|
201
196
|
await o(m);
|
|
202
197
|
});
|
|
203
198
|
async function o(m) {
|
|
204
199
|
var l;
|
|
205
|
-
(l =
|
|
200
|
+
(l = S.value) == null || l.showSheet(
|
|
206
201
|
!0,
|
|
207
202
|
"PROMOTION",
|
|
208
203
|
e ? await g.readById(e._id) : void 0,
|
|
@@ -210,28 +205,28 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
210
205
|
);
|
|
211
206
|
}
|
|
212
207
|
}
|
|
213
|
-
async function
|
|
208
|
+
async function U(e) {
|
|
214
209
|
await R.push({
|
|
215
|
-
name:
|
|
210
|
+
name: Ce["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
|
|
216
211
|
params: { id: e._id }
|
|
217
212
|
});
|
|
218
213
|
}
|
|
219
|
-
async function
|
|
214
|
+
async function j(e) {
|
|
220
215
|
var l;
|
|
221
216
|
if (!await he(e.name))
|
|
222
217
|
return;
|
|
223
218
|
const o = await g.readById(e._id), m = _e(o);
|
|
224
|
-
(l =
|
|
219
|
+
(l = S.value) == null || l.showSheet(
|
|
225
220
|
!0,
|
|
226
221
|
"PROMOTION",
|
|
227
222
|
m,
|
|
228
223
|
o.template
|
|
229
224
|
);
|
|
230
225
|
}
|
|
231
|
-
async function
|
|
226
|
+
async function W(e) {
|
|
232
227
|
await v(
|
|
233
228
|
async () => {
|
|
234
|
-
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await
|
|
229
|
+
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await i.read("PROMOTION");
|
|
235
230
|
},
|
|
236
231
|
{
|
|
237
232
|
message: n(
|
|
@@ -243,14 +238,14 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
243
238
|
}
|
|
244
239
|
);
|
|
245
240
|
}
|
|
246
|
-
async function
|
|
241
|
+
async function X(e) {
|
|
247
242
|
var o;
|
|
248
243
|
switch (e) {
|
|
249
244
|
case "create":
|
|
250
|
-
|
|
245
|
+
k();
|
|
251
246
|
break;
|
|
252
247
|
case "sync":
|
|
253
|
-
await
|
|
248
|
+
await D.confirm(
|
|
254
249
|
"Are you sure you want to synchronize all promotions to POS?",
|
|
255
250
|
"Force sync"
|
|
256
251
|
) && v(
|
|
@@ -268,41 +263,41 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
268
263
|
break;
|
|
269
264
|
}
|
|
270
265
|
}
|
|
271
|
-
const
|
|
272
|
-
return
|
|
266
|
+
const Z = ve();
|
|
267
|
+
return se(async () => {
|
|
273
268
|
var e;
|
|
274
269
|
await u(async () => {
|
|
275
|
-
await
|
|
276
|
-
}), await
|
|
270
|
+
await C.readLocations(), await i.read("PROMOTION");
|
|
271
|
+
}), await Z.consume() === "PROMOTION_CUSTOM" && ((e = S.value) == null || e.showSheet(!0, "PROMOTION"));
|
|
277
272
|
}), (e, o) => {
|
|
278
|
-
const m = p("FmPageHead"), l = p("FmSearch"),
|
|
279
|
-
return y(), L
|
|
280
|
-
|
|
273
|
+
const m = p("FmPageHead"), l = p("FmSearch"), x = p("FmTable"), ee = p("FmChip"), F = p("FmButton"), oe = p("FmListItem"), te = p("FmList"), ne = p("FmCard");
|
|
274
|
+
return y(), A(L, null, [
|
|
275
|
+
s(m, {
|
|
281
276
|
title: a(n)("connect.promotion.title"),
|
|
282
|
-
actions: a(h).length > 0 ? [B, d,
|
|
283
|
-
"onClick:action":
|
|
277
|
+
actions: a(h).length > 0 ? [B, d, w] : [],
|
|
278
|
+
"onClick:action": X
|
|
284
279
|
}, null, 8, ["title", "actions"]),
|
|
285
|
-
|
|
286
|
-
|
|
280
|
+
r("div", xe, [
|
|
281
|
+
s(l, {
|
|
287
282
|
modelValue: c.value.searchKey,
|
|
288
283
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => c.value.searchKey = t),
|
|
289
284
|
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
290
285
|
placeholder: a(n)("connect.promotion.search"),
|
|
291
286
|
collapsible: ""
|
|
292
287
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
293
|
-
a(h) && a(h).length > 0 ? (y(), L
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
a(h) && a(h).length > 0 ? (y(), A(L, { key: 0 }, [
|
|
289
|
+
r("div", Fe, [
|
|
290
|
+
r("div", Oe, [
|
|
291
|
+
s(Q, {
|
|
297
292
|
label: `${a(n)("connect.common.location")}: `,
|
|
298
293
|
"right-icon": "keyboard_arrow_down",
|
|
299
294
|
modelValue: c.value.location,
|
|
300
295
|
"onUpdate:modelValue": o[1] || (o[1] = (t) => c.value.location = t),
|
|
301
296
|
icon: "storefront",
|
|
302
297
|
"show-item-label": !0,
|
|
303
|
-
items: a(
|
|
298
|
+
items: a(C).locationOptions
|
|
304
299
|
}, null, 8, ["label", "modelValue", "items"]),
|
|
305
|
-
|
|
300
|
+
s(Q, {
|
|
306
301
|
label: "Type:",
|
|
307
302
|
"right-icon": "keyboard_arrow_down",
|
|
308
303
|
modelValue: c.value.effectType,
|
|
@@ -312,7 +307,7 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
312
307
|
items: f
|
|
313
308
|
}, null, 8, ["modelValue"])
|
|
314
309
|
]),
|
|
315
|
-
|
|
310
|
+
s(l, {
|
|
316
311
|
modelValue: c.value.searchKey,
|
|
317
312
|
"onUpdate:modelValue": o[3] || (o[3] = (t) => c.value.searchKey = t),
|
|
318
313
|
class: "xs:hidden sm:hidden",
|
|
@@ -320,62 +315,61 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
320
315
|
collapsible: ""
|
|
321
316
|
}, null, 8, ["modelValue"])
|
|
322
317
|
]),
|
|
323
|
-
|
|
318
|
+
s(x, {
|
|
324
319
|
class: "xs:hidden sm:hidden",
|
|
325
320
|
"row-data": a(h),
|
|
326
|
-
"column-defs":
|
|
321
|
+
"column-defs": J,
|
|
327
322
|
"search-value": c.value.searchKey,
|
|
328
323
|
"column-filter": [],
|
|
329
|
-
onRowClick: o[4] || (o[4] = (t) =>
|
|
324
|
+
onRowClick: o[4] || (o[4] = (t) => k(t.original)),
|
|
330
325
|
"hide-footer": a(h).length < 10
|
|
331
326
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
332
|
-
|
|
327
|
+
s(te, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
333
328
|
default: V(() => [
|
|
334
|
-
(y(!0), L
|
|
329
|
+
(y(!0), A(L, null, re(a(h).filter(
|
|
335
330
|
(t) => t.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
|
|
336
|
-
), (t) => (y(), T(
|
|
331
|
+
), (t) => (y(), T(oe, {
|
|
337
332
|
key: t._id.toString(),
|
|
338
|
-
onClick: (_) =>
|
|
333
|
+
onClick: (_) => k(t),
|
|
339
334
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
340
335
|
}, {
|
|
341
336
|
default: V(() => [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
(y(), T(
|
|
345
|
-
|
|
337
|
+
r("div", Pe, [
|
|
338
|
+
r("div", Te, [
|
|
339
|
+
(y(), T(le(a(q)(t)))),
|
|
340
|
+
s(ee, {
|
|
346
341
|
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
347
342
|
compact: !0,
|
|
348
|
-
label: `${a(
|
|
343
|
+
label: `${a(E).title(t.effect.options.target)} promotion`
|
|
349
344
|
}, null, 8, ["label"])
|
|
350
345
|
]),
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
i("div", Ae, w(a(n)("connect.promotion.campaignDate")) + ": " + w(a(q)(t)), 1)
|
|
346
|
+
r("div", Ve, [
|
|
347
|
+
r("div", Ie, P(t.name), 1),
|
|
348
|
+
r("div", Re, P(a(K)(t.effect)), 1)
|
|
355
349
|
])
|
|
356
350
|
]),
|
|
357
|
-
|
|
358
|
-
|
|
351
|
+
r("div", Ae, [
|
|
352
|
+
s(F, {
|
|
359
353
|
icon: "insights",
|
|
360
354
|
"icon-color": "neutral-gray-400",
|
|
361
355
|
variant: "tertiary",
|
|
362
356
|
onClick: async (_) => {
|
|
363
|
-
_.stopPropagation(), await
|
|
357
|
+
_.stopPropagation(), await U(t);
|
|
364
358
|
}
|
|
365
359
|
}, null, 8, ["onClick"]),
|
|
366
|
-
|
|
360
|
+
s(F, {
|
|
367
361
|
icon: "content_copy",
|
|
368
362
|
"icon-color": "neutral-gray-400",
|
|
369
363
|
variant: "tertiary",
|
|
370
364
|
onClick: async (_) => {
|
|
371
|
-
_.stopPropagation(), await
|
|
365
|
+
_.stopPropagation(), await j(t);
|
|
372
366
|
}
|
|
373
367
|
}, null, 8, ["onClick"]),
|
|
374
|
-
|
|
368
|
+
s(F, {
|
|
375
369
|
icon: "delete",
|
|
376
370
|
"icon-color": "neutral-gray-400",
|
|
377
371
|
variant: "tertiary",
|
|
378
|
-
onClick: (_) => (_.stopPropagation(),
|
|
372
|
+
onClick: (_) => (_.stopPropagation(), $(t))
|
|
379
373
|
}, null, 8, ["onClick"])
|
|
380
374
|
])
|
|
381
375
|
]),
|
|
@@ -384,36 +378,36 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
384
378
|
]),
|
|
385
379
|
_: 1
|
|
386
380
|
})
|
|
387
|
-
], 64)) : (y(), T(
|
|
381
|
+
], 64)) : (y(), T(ne, {
|
|
388
382
|
key: 1,
|
|
389
383
|
variant: "outlined",
|
|
390
384
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
391
385
|
}, {
|
|
392
386
|
default: V(() => [
|
|
393
|
-
o[6] || (o[6] =
|
|
394
|
-
src:
|
|
387
|
+
o[6] || (o[6] = r("img", {
|
|
388
|
+
src: ce,
|
|
395
389
|
class: "aspect-square w-[150px]"
|
|
396
390
|
}, null, -1)),
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
391
|
+
r("div", Le, [
|
|
392
|
+
r("div", Me, P(a(n)("connect.promotion.createPromotionCampaign")), 1),
|
|
393
|
+
r("div", Be, P(a(n)("connect.promotion.description")), 1)
|
|
400
394
|
]),
|
|
401
|
-
|
|
395
|
+
s(F, {
|
|
402
396
|
variant: "primary",
|
|
403
397
|
label: a(n)("connect.promotion.createPromotionCampaign"),
|
|
404
398
|
icon: "add",
|
|
405
|
-
onClick: o[5] || (o[5] = (t) =>
|
|
399
|
+
onClick: o[5] || (o[5] = (t) => k())
|
|
406
400
|
}, null, 8, ["label"])
|
|
407
401
|
]),
|
|
408
402
|
_: 1
|
|
409
403
|
}))
|
|
410
404
|
]),
|
|
411
|
-
|
|
405
|
+
s(we, {
|
|
412
406
|
ref_key: "sheetRef",
|
|
413
|
-
ref:
|
|
414
|
-
"onSubmit:modelValue":
|
|
407
|
+
ref: S,
|
|
408
|
+
"onSubmit:modelValue": W
|
|
415
409
|
}, null, 512),
|
|
416
|
-
|
|
410
|
+
s(ke, {
|
|
417
411
|
ref_key: "queueSheetRef",
|
|
418
412
|
ref: N
|
|
419
413
|
}, null, 512)
|
|
@@ -422,5 +416,5 @@ const xe = { class: "space-y-8" }, Fe = /* @__PURE__ */ z({
|
|
|
422
416
|
}
|
|
423
417
|
});
|
|
424
418
|
export {
|
|
425
|
-
|
|
419
|
+
to as default
|
|
426
420
|
};
|