@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71

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.
Files changed (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
  4. package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
  5. package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
  7. package/dist/Card-dD52oor7.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
  9. package/dist/Credit-qZdlqXqR.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-fhrbFb_5.js +356 -0
  17. package/dist/GiftCardSetup-CTwmNKim.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
  23. package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
  24. package/dist/MainLayout-Bf42AcB1.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
  27. package/dist/Member-C9VTQqIm.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
  29. package/dist/MemberImportHistory-DZVwya9v.js +187 -0
  30. package/dist/MemberList-KusIfy1u.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
  34. package/dist/Mission-CUUxpBUF.js +360 -0
  35. package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
  36. package/dist/Overview-CYKoF8Hp.js +1316 -0
  37. package/dist/Point-CPpQ07yp.js +288 -0
  38. package/dist/Promotion-CJ95m9Qb.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
  41. package/dist/Review-DoWu2XNT.js +45 -0
  42. package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
  43. package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
  52. package/dist/Settings-Cw85-xzq.js +230 -0
  53. package/dist/Store-BSqW1gwf.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
  59. package/dist/Transaction-dOCzlidD.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BmUK8hMh.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
  68. package/dist/campaign-DlR3KF9m.js +368 -0
  69. package/dist/campaign-tAmQNoq7.js +100 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
  73. package/dist/collection.fn-CDhfM3Eq.js +26 -0
  74. package/dist/currency-10nX5QnT.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
  80. package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
  81. package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
  82. package/dist/index-BQk6zTgf.js +32437 -0
  83. package/dist/index-Bd4clHfr.js +901 -0
  84. package/dist/index-BeVWchv7.js +14550 -0
  85. package/dist/index-Bht1Z11w.js +72 -0
  86. package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
  87. package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
  88. package/dist/index-Bz6oSli7.js +151 -0
  89. package/dist/index-C5IfNJUl.js +53 -0
  90. package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
  91. package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
  92. package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
  93. package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
  94. package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
  95. package/dist/index-DXiJa8Cw.js +137 -0
  96. package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
  97. package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
  101. package/dist/member-import-DX-jn2uk.js +187 -0
  102. package/dist/membership-CltAa-gH.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
  105. package/dist/objectid-BdNv-dZX.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
  112. package/dist/timezone-D2b-V5XD.js +20 -0
  113. package/dist/transaction.fn-B5mLY7bz.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
  118. package/dist/vue-i18n-wJReAVJw.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -0,0 +1,423 @@
1
+ import { defineComponent as z, ref as C, resolveComponent as p, openBlock as y, createBlock as T, unref as a, isRef as ae, withCtx as O, createElementVNode as i, createVNode as r, computed as ie, h as P, onMounted as se, createElementBlock as L, Fragment as A, renderList as re, resolveDynamicComponent as le, toDisplayString as w } from "vue";
2
+ import { _ as ce } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as me, components as B } from "@feedmepos/ui-library";
4
+ import { p as U } from "./plugins-BFKVM3uC.js";
5
+ import { u as ue } from "./loading-Dx4SCvZY.js";
6
+ import { u as pe } from "./business-DjAiT8tR.js";
7
+ import { u as de } from "./campaign-tAmQNoq7.js";
8
+ import { u as fe } from "./vue-i18n-wJReAVJw.js";
9
+ import { g as q, a as ye, b as K } from "./campaign-DlR3KF9m.js";
10
+ import { c as ge, p as _e } from "./duplicateCampaign-6oMZOvfM.js";
11
+ import { e as E } from "./effect-T4YzuTc5.js";
12
+ import { c as Q } from "./string-Gcy5IM_H.js";
13
+ import "./index-D8rGhchh.js";
14
+ import { _ as he } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js";
15
+ import { c as g } from "./index-Bz6oSli7.js";
16
+ import { u as we } from "./template-Cfxc5eM8.js";
17
+ import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
18
+ import { useRouter as be } from "vue-router";
19
+ import { R as ve } from "./app-BxTElIm-.js";
20
+ const Ce = { class: "space-y-8" }, xe = /* @__PURE__ */ z({
21
+ __name: "QueueSheet",
22
+ emits: ["update:model-value"],
23
+ setup(G, { expose: n, emit: M }) {
24
+ const d = C(!1), b = C([]);
25
+ async function V() {
26
+ d.value = !0;
27
+ const s = await g.getPromotionQueue();
28
+ console.log(s, "jobs"), b.value = s;
29
+ }
30
+ const x = [
31
+ {
32
+ header: "Started At",
33
+ accessorFn: (s) => s.createdAt,
34
+ enableSorting: !0
35
+ },
36
+ {
37
+ header: "Campaigns",
38
+ accessorFn: (s) => s.campaigns
39
+ // cell(props) {
40
+ // const r = props.row.original;
41
+ // return h('div', {
42
+ // innerHTML: r.campaigns.map((c: any) => c.name).join(', '),
43
+ // });
44
+ // },
45
+ }
46
+ ];
47
+ return n({
48
+ showSheet: V
49
+ }), (s, u) => {
50
+ const v = p("FmTable"), I = p("FmSideSheet");
51
+ return y(), T(I, {
52
+ "max-width": 550,
53
+ header: "Promotion Sync Queue",
54
+ modelValue: a(d),
55
+ "onUpdate:modelValue": [
56
+ u[1] || (u[1] = (f) => ae(d) ? d.value = f : null),
57
+ u[2] || (u[2] = (f) => d.value = f)
58
+ ]
59
+ }, {
60
+ default: O(() => [
61
+ i("div", Ce, [
62
+ u[3] || (u[3] = i("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
+ r(v, {
64
+ modelValue: s.tableRef,
65
+ "onUpdate:modelValue": u[0] || (u[0] = (f) => s.tableRef = f),
66
+ "column-filter": s.jobFilters,
67
+ "column-defs": x,
68
+ "row-data": a(b),
69
+ "hide-footer": a(b).length <= 10
70
+ }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
71
+ ])
72
+ ]),
73
+ _: 1
74
+ }, 8, ["modelValue"]);
75
+ };
76
+ }
77
+ }), Fe = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Pe = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Oe = { class: "space-y-4" }, Ve = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex items-center gap-8" }, Ae = { class: "flex flex-col gap-16 text-center" }, Be = { class: "fm-typo-en-title-sm-800" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = /* @__PURE__ */ z({
78
+ __name: "Promotion",
79
+ setup(G) {
80
+ const { t: n } = fe(), M = {
81
+ label: n("connect.promotion.createCampaign"),
82
+ value: "create",
83
+ isPrimary: !0,
84
+ prependIcon: "add"
85
+ }, d = {
86
+ label: "Force sync",
87
+ value: "sync",
88
+ isPrimary: !1,
89
+ prependIcon: "refresh"
90
+ }, b = {
91
+ label: "Queue",
92
+ value: "queue",
93
+ isPrimary: !1,
94
+ prependIcon: "work_history"
95
+ }, V = we("PROMOTION", me()), x = pe(), s = de(), { global: u, minor: v } = ue, I = be(), f = [
96
+ {
97
+ label: "Bill promotion",
98
+ value: "BILL"
99
+ },
100
+ {
101
+ label: "Item promotion",
102
+ value: "ITEM"
103
+ }
104
+ ], c = C({
105
+ searchKey: "",
106
+ location: [],
107
+ effectType: []
108
+ });
109
+ function Y(e) {
110
+ const o = c.value.location;
111
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
112
+ var l;
113
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
114
+ }) : e.targetLocation.includes(o);
115
+ }
116
+ function J(e) {
117
+ var l, k;
118
+ const o = c.value.effectType;
119
+ if (!o || o.length === 0) return !0;
120
+ const m = (k = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : k.target;
121
+ return o.includes(m);
122
+ }
123
+ const _ = ie(
124
+ () => s.campaigns.promotion.filter(
125
+ (e) => Y(e) && J(e)
126
+ )
127
+ ), W = [
128
+ {
129
+ header: n("connect.promotion.promotionTitle"),
130
+ accessorFn: (e) => e.name
131
+ },
132
+ {
133
+ header: n("connect.promotion.campaignDate"),
134
+ accessorFn: (e) => q(e)
135
+ },
136
+ {
137
+ header: n("connect.promotion.status"),
138
+ accessorFn: (e) => ye(e),
139
+ cell(e) {
140
+ return K(e.row.original);
141
+ }
142
+ },
143
+ {
144
+ header: n("connect.promotion.type"),
145
+ accessorFn: (e) => `${Q.title(e.effect.options.target)} promotion`
146
+ },
147
+ {
148
+ header: n("connect.promotion.summary"),
149
+ accessorFn: (e) => E(e.effect)
150
+ },
151
+ {
152
+ header: n("connect.promotion.actions"),
153
+ cell(e) {
154
+ return P("div", { class: "flex items-center gap-8 justify-end" }, [
155
+ P(B.FmButton, {
156
+ variant: "tertiary",
157
+ icon: "insights",
158
+ iconColor: "neutral-gray-400",
159
+ onClick: async (o) => {
160
+ o.stopPropagation(), await $(e.row.original);
161
+ }
162
+ }),
163
+ P(B.FmButton, {
164
+ variant: "tertiary",
165
+ icon: "content_copy",
166
+ iconColor: "neutral-gray-400",
167
+ onClick: async (o) => {
168
+ o.stopPropagation(), await j(e.row.original);
169
+ }
170
+ }),
171
+ P(B.FmButton, {
172
+ variant: "tertiary",
173
+ icon: "delete",
174
+ iconColor: "neutral-gray-400",
175
+ onClick: (o) => {
176
+ o.stopPropagation(), D(e.row.original);
177
+ }
178
+ })
179
+ ]);
180
+ }
181
+ }
182
+ ], R = C(), N = C();
183
+ async function D(e) {
184
+ await U.remove(
185
+ n("connect.promotion.confirmRemove", { name: e.name })
186
+ ) && await v(
187
+ async () => {
188
+ await g.delete(e._id), await s.read("PROMOTION");
189
+ },
190
+ {
191
+ message: n("connect.promotion.removing", { name: e.name }),
192
+ successMessage: n("connect.promotion.removedSuccessfully", {
193
+ name: e.name
194
+ })
195
+ }
196
+ );
197
+ }
198
+ async function F(e) {
199
+ e ? await o() : V.open(async (m) => {
200
+ await o(m);
201
+ });
202
+ async function o(m) {
203
+ var l;
204
+ (l = R.value) == null || l.showSheet(
205
+ !0,
206
+ "PROMOTION",
207
+ e ? await g.readById(e._id) : void 0,
208
+ m
209
+ );
210
+ }
211
+ }
212
+ async function $(e) {
213
+ await I.push({
214
+ name: ve["$connect-CAMPAIGN_PROMOTION_ANALYTIC"],
215
+ params: { id: e._id }
216
+ });
217
+ }
218
+ async function j(e) {
219
+ var l;
220
+ if (!await ge(e.name))
221
+ return;
222
+ const o = await g.readById(e._id), m = _e(o);
223
+ (l = R.value) == null || l.showSheet(
224
+ !0,
225
+ "PROMOTION",
226
+ m,
227
+ o.template
228
+ );
229
+ }
230
+ async function X(e) {
231
+ await v(
232
+ async () => {
233
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await s.read("PROMOTION");
234
+ },
235
+ {
236
+ message: n(
237
+ e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
238
+ ),
239
+ successMessage: n(
240
+ e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
241
+ )
242
+ }
243
+ );
244
+ }
245
+ async function Z(e) {
246
+ var o;
247
+ switch (e) {
248
+ case "create":
249
+ F();
250
+ break;
251
+ case "sync":
252
+ await U.confirm(
253
+ "Are you sure you want to synchronize all promotions to POS?",
254
+ "Force sync"
255
+ ) && v(
256
+ async () => {
257
+ await g.syncAllPromotion();
258
+ },
259
+ {
260
+ message: "Syncing promotions...",
261
+ successMessage: "All promotions synced"
262
+ }
263
+ );
264
+ break;
265
+ case "queue":
266
+ (o = N.value) == null || o.showSheet();
267
+ break;
268
+ }
269
+ }
270
+ return se(async () => {
271
+ await u(async () => {
272
+ await x.readLocations(), await s.read("PROMOTION");
273
+ });
274
+ }), (e, o) => {
275
+ const m = p("FmPageHead"), l = p("FmSearch"), k = p("FmTable"), ee = p("FmChip"), S = p("FmButton"), oe = p("FmListItem"), te = p("FmList"), ne = p("FmCard");
276
+ return y(), L(A, null, [
277
+ r(m, {
278
+ title: a(n)("connect.promotion.title"),
279
+ actions: a(_).length > 0 ? [M, d, b] : [],
280
+ "onClick:action": Z
281
+ }, null, 8, ["title", "actions"]),
282
+ i("div", Fe, [
283
+ r(l, {
284
+ modelValue: c.value.searchKey,
285
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => c.value.searchKey = t),
286
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
287
+ placeholder: a(n)("connect.promotion.search"),
288
+ collapsible: ""
289
+ }, null, 8, ["modelValue", "placeholder"]),
290
+ a(_) && a(_).length > 0 ? (y(), L(A, { key: 0 }, [
291
+ i("div", ke, [
292
+ i("div", Se, [
293
+ r(H, {
294
+ label: `${a(n)("connect.common.location")}: `,
295
+ "right-icon": "keyboard_arrow_down",
296
+ modelValue: c.value.location,
297
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => c.value.location = t),
298
+ icon: "storefront",
299
+ "show-item-label": !0,
300
+ items: a(x).locationOptions
301
+ }, null, 8, ["label", "modelValue", "items"]),
302
+ r(H, {
303
+ label: "Type:",
304
+ "right-icon": "keyboard_arrow_down",
305
+ modelValue: c.value.effectType,
306
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => c.value.effectType = t),
307
+ icon: "filter_list",
308
+ "show-item-label": !0,
309
+ items: f
310
+ }, null, 8, ["modelValue"])
311
+ ]),
312
+ r(l, {
313
+ modelValue: c.value.searchKey,
314
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => c.value.searchKey = t),
315
+ class: "xs:hidden sm:hidden",
316
+ placeholder: "search",
317
+ collapsible: ""
318
+ }, null, 8, ["modelValue"])
319
+ ]),
320
+ r(k, {
321
+ class: "xs:hidden sm:hidden",
322
+ "row-data": a(_),
323
+ "column-defs": W,
324
+ "search-value": c.value.searchKey,
325
+ "column-filter": [],
326
+ onRowClick: o[4] || (o[4] = (t) => F(t.original)),
327
+ "hide-footer": a(_).length < 10
328
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
329
+ r(te, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
330
+ default: O(() => [
331
+ (y(!0), L(A, null, re(a(_).filter(
332
+ (t) => t.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
333
+ ), (t) => (y(), T(oe, {
334
+ key: t._id.toString(),
335
+ onClick: (h) => F(t),
336
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
337
+ }, {
338
+ default: O(() => [
339
+ i("div", Pe, [
340
+ i("div", Te, [
341
+ (y(), T(le(a(K)(t)))),
342
+ r(ee, {
343
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
344
+ compact: !0,
345
+ label: `${a(Q).title(t.effect.options.target)} promotion`
346
+ }, null, 8, ["label"])
347
+ ]),
348
+ i("div", Oe, [
349
+ i("div", Ve, w(t.name), 1),
350
+ i("div", Ie, w(a(E)(t.effect)), 1),
351
+ i("div", Re, w(a(n)("connect.promotion.campaignDate")) + ": " + w(a(q)(t)), 1)
352
+ ])
353
+ ]),
354
+ i("div", Le, [
355
+ r(S, {
356
+ icon: "insights",
357
+ "icon-color": "neutral-gray-400",
358
+ variant: "tertiary",
359
+ onClick: async (h) => {
360
+ h.stopPropagation(), await $(t);
361
+ }
362
+ }, null, 8, ["onClick"]),
363
+ r(S, {
364
+ icon: "content_copy",
365
+ "icon-color": "neutral-gray-400",
366
+ variant: "tertiary",
367
+ onClick: async (h) => {
368
+ h.stopPropagation(), await j(t);
369
+ }
370
+ }, null, 8, ["onClick"]),
371
+ r(S, {
372
+ icon: "delete",
373
+ "icon-color": "neutral-gray-400",
374
+ variant: "tertiary",
375
+ onClick: (h) => (h.stopPropagation(), D(t))
376
+ }, null, 8, ["onClick"])
377
+ ])
378
+ ]),
379
+ _: 2
380
+ }, 1032, ["onClick"]))), 128))
381
+ ]),
382
+ _: 1
383
+ })
384
+ ], 64)) : (y(), T(ne, {
385
+ key: 1,
386
+ variant: "outlined",
387
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
388
+ }, {
389
+ default: O(() => [
390
+ o[6] || (o[6] = i("img", {
391
+ src: ce,
392
+ class: "aspect-square w-[150px]"
393
+ }, null, -1)),
394
+ i("div", Ae, [
395
+ i("div", Be, w(a(n)("connect.promotion.createPromotionCampaign")), 1),
396
+ i("div", Me, w(a(n)("connect.promotion.description")), 1)
397
+ ]),
398
+ r(S, {
399
+ variant: "primary",
400
+ label: a(n)("connect.promotion.createPromotionCampaign"),
401
+ icon: "add",
402
+ onClick: o[5] || (o[5] = (t) => F())
403
+ }, null, 8, ["label"])
404
+ ]),
405
+ _: 1
406
+ }))
407
+ ]),
408
+ r(he, {
409
+ ref_key: "sheetRef",
410
+ ref: R,
411
+ "onSubmit:modelValue": X
412
+ }, null, 512),
413
+ r(xe, {
414
+ ref_key: "queueSheetRef",
415
+ ref: N
416
+ }, null, 512)
417
+ ], 64);
418
+ };
419
+ }
420
+ });
421
+ export {
422
+ to as default
423
+ };
@@ -1,19 +1,20 @@
1
1
  import { defineComponent as h, h as n, ref as A, watch as B, onBeforeMount as U, resolveComponent as V, openBlock as z, createElementBlock as O, Fragment as q, createVNode as m, unref as o, createElementVNode as g } from "vue";
2
- import { u as G, _ as L } from "./usePagination-BPcPhEnp.js";
3
- import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
2
+ import { u as G, _ as L } from "./usePagination-DKX24g31.js";
3
+ import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
4
4
  import { c as u } from "./string-Gcy5IM_H.js";
5
- import { c as Y } from "./plugins-D25PaNJk.js";
5
+ import { c as Y } from "./plugins-BFKVM3uC.js";
6
6
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
7
- import "./index-BrboOmPq.js";
8
- import { N as c, c as d } from "./index-DgzNGQgE.js";
9
- import "./index-CB7ytKOE.js";
10
- import "./index-Cl8t41Sk.js";
11
- import "./index-vI-ndGu_.js";
7
+ import "./index-DJdTDF9C.js";
8
+ import "./index-B9ZMIUMa.js";
9
+ import "./index-BBsK7TUw.js";
10
+ import "./index-BxU--5J5.js";
11
+ import { n as c, a as d } from "./index-Bd4clHfr.js";
12
+ import "./index-DhtKt4OL.js";
12
13
  import { h as b } from "./moment-D7p2TMB-.js";
13
- import { u as W } from "./vue-i18n-CgMK-TaC.js";
14
- import { u as H, v as K, w as Q } from "./index.esm2017-BX5CyKoc.js";
14
+ import { u as W } from "./vue-i18n-wJReAVJw.js";
15
+ import { u as H, v as K, w as Q } from "./index.esm2017-CEOegJjn.js";
15
16
  import { useRoute as $ } from "vue-router";
16
- import { g as J, S as Z, u as X } from "./index-CWiaP-aV.js";
17
+ import { g as J, S as Z, u as X } from "./index-BQk6zTgf.js";
17
18
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
19
  const te = () => {
19
20
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -28,7 +29,7 @@ const te = () => {
28
29
  }
29
30
  };
30
31
  var ae = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
31
- const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, xe = /* @__PURE__ */ h({
32
+ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, Ee = /* @__PURE__ */ h({
32
33
  __name: "Queue",
33
34
  setup(p) {
34
35
  const v = $().query.type, { t: x } = W(), E = j(), C = [
@@ -256,5 +257,5 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
256
257
  }
257
258
  });
258
259
  export {
259
- xe as default
260
+ Ee as default
260
261
  };
@@ -2,19 +2,19 @@ var q = Object.defineProperty;
2
2
  var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
3
3
  var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
4
4
  import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
5
- import { u as oe, _ as ae } from "./usePagination-BPcPhEnp.js";
6
- import { g as A } from "./user-Bd8S7R5u.js";
5
+ import { u as oe, _ as ae } from "./usePagination-DKX24g31.js";
6
+ import { g as A } from "./user-fWb1NxGO.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-Cl8t41Sk.js";
9
- import { u as j } from "./vue-i18n-CgMK-TaC.js";
10
- import { u as L } from "./loading-DTKDhqew.js";
8
+ import "./index-BxU--5J5.js";
9
+ import { u as j } from "./vue-i18n-wJReAVJw.js";
10
+ import { u as L } from "./loading-Dx4SCvZY.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-B6xi1soU.js";
12
+ import { r as v } from "./index-CnaQt4Pn.js";
13
13
  import { c as ie, a as ne } from "./object-BYyQ0PZp.js";
14
- import { u as ce } from "./membership-rifuatxU.js";
14
+ import { u as ce } from "./membership-CltAa-gH.js";
15
15
  import { c as le } from "./string-Gcy5IM_H.js";
16
- import { c as de } from "./plugins-D25PaNJk.js";
17
- import { u as V, w as me } from "./xlsx-_tQC9Ezf.js";
16
+ import { c as de } from "./plugins-BFKVM3uC.js";
17
+ import { u as V, w as me } from "./xlsx-Mthhu4JR.js";
18
18
  import { e as f } from "./index-vh86FiIQ.js";
19
19
  import { h as ue } from "./moment-D7p2TMB-.js";
20
20
  import { o as pe } from "./objectId-dwaoBfJX.js";
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, computed as v, resolveComponent as n, openBlock as f, createElementBlock as E, Fragment as R, createVNode as a, unref as l, createElementVNode as s } from "vue";
2
+ import { u as b } from "./vue-i18n-wJReAVJw.js";
3
+ import { R as r } from "./app-BxTElIm-.js";
4
+ import { useRouter as V } from "vue-router";
5
+ const w = { class: "flex flex-col" }, T = { class: "px-24" }, S = /* @__PURE__ */ d({
6
+ __name: "Review",
7
+ setup(g) {
8
+ const { t } = b(), c = V(), o = [
9
+ {
10
+ label: t("connect.review.tabs.overview"),
11
+ value: r["$connect-REVIEW_OVERVIEW"]
12
+ },
13
+ {
14
+ label: t("connect.review.tabs.settings"),
15
+ value: r["$connect-REVIEW_SETTINGS"]
16
+ }
17
+ ], m = v(
18
+ () => o.find((e) => e.value === c.currentRoute.value.name) ?? o[0]
19
+ );
20
+ async function u(e) {
21
+ await c.push({ name: e });
22
+ }
23
+ return (e, x) => {
24
+ const i = n("FmPageHead"), _ = n("FmTabs"), p = n("RouterView");
25
+ return f(), E(R, null, [
26
+ a(i, {
27
+ title: l(t)("connect.navigation.review")
28
+ }, null, 8, ["title"]),
29
+ s("div", w, [
30
+ s("div", T, [
31
+ a(_, {
32
+ "model-value": l(m).value,
33
+ items: o,
34
+ "onUpdate:modelValue": u
35
+ }, null, 8, ["model-value"])
36
+ ]),
37
+ a(p)
38
+ ])
39
+ ], 64);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ S as default
45
+ };