@feedmepos/mf-connect 0.0.12-beta.5 → 0.0.13-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-DMbCeTaO.js +612 -0
- package/dist/{Broadcast-BFHQPSXL.js → Broadcast-bVaOzrys.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B1DYJDOy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd2midth.js} +8 -8
- package/dist/{Card-rOJ8yJg_.js → Card-CdCTfDuP.js} +127 -127
- package/dist/{Collections-BT8ihCOa.js → Collections-CQIHkJ4W.js} +129 -141
- package/dist/{Credit-D83Jsn7v.js → Credit-DuIm1c4_.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang--L-LP0DV.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DljWmOEP.js} +258 -242
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-HLzZirO_.js → EffectSheet.vue_vue_type_style_index_0_lang-BuJL01zR.js} +6 -6
- package/dist/{Experience-C6uBhQod.js → Experience-DEnMLbsA.js} +7 -7
- package/dist/{Game-5P5HWqAL.js → Game-BYS0nrH6.js} +7 -7
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DTDcpMpW.js → ImageInput.vue_vue_type_script_setup_true_lang-DW2tVaY0.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CQIJ54m1.js → MainLayout-BkFJubzZ.js} +53 -20
- package/dist/{Marketing-ONuItJ_B.js → Marketing-Da0HTlaz.js} +25 -25
- package/dist/{Member-SB2IySXY.js → Member-CVe_bRGx.js} +2 -2
- package/dist/MemberList-DpUy4gFd.js +1718 -0
- package/dist/{MemberTransactions-DPQ6M7eR.js → MemberTransactions-DWdTDUIJ.js} +2 -2
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-1KjmvWsp.js +203 -0
- package/dist/{Mission-rdnU6erJ.js → Mission-0eSMWCls.js} +7 -7
- package/dist/{Point-C2M66ORj.js → Point-ju1eHI9Z.js} +7 -7
- package/dist/{Promotion-DixbjmMJ.js → Promotion-DZjWvnQa.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CJsIBnGp.js → RuleGroup.vue_vue_type_script_setup_true_lang-CDPvpj10.js} +14 -14
- package/dist/{Segment-j_zQSV7O.js → Segment-Da_kMLWC.js} +18 -19
- package/dist/{Setting-ClhkF-bT.js → Setting-CxX35f3G.js} +541 -571
- package/dist/Store-DjUI3S8V.js +1442 -0
- package/dist/{StoreRewards-Bh90Ml4z.js → StoreRewards-92k0Bvp_.js} +74 -75
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DlbNMiw9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bsrz-oMi.js} +79 -82
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DNkJ-pFL.js +124 -0
- package/dist/{Tier-vxsDt3Kj.js → Tier-2J4GN90t.js} +68 -71
- package/dist/{Title-IFyz9vfW.js → Title-B3Dw3w_5.js} +75 -78
- package/dist/{Transaction-ETa-y_H9.js → Transaction-Dz6WT5Hb.js} +1 -1
- package/dist/{Voucher-BMYcuaPn.js → Voucher-Bf3oSOKc.js} +37 -37
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/{app-Bl9KwQq5.js → app-BSmDH0M7.js} +46 -46
- package/dist/{app-BqWTxQI-.js → app-C7I-jK_l.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{campaign-DI8CmTo2.js → campaign-CmvlWUoI.js} +11 -13
- package/dist/{collection.fn-CTEuol1r.js → collection.fn-DHlfGYAC.js} +2 -4
- package/dist/{dto-Bdlgo-8k.js → dto-rs6D-mtj.js} +239 -239
- package/dist/{effect-BdgYZfgW.js → effect-D8eQcTDU.js} +1 -1
- package/dist/{export-Dr_7YvBE.js → export-Bf2h8rMP.js} +3 -3
- package/dist/{helper-BygQ4tND.js → helper-BSlBLPdy.js} +1 -1
- package/dist/{index-CstgquVp.js → index-B64Y4rdW.js} +2 -2
- package/dist/{index-Djv3w5gV.js → index-BVSAl8E2.js} +37 -46
- package/dist/{index-DzQwND7p.js → index-CdMMIVsr.js} +217 -232
- package/dist/index-CuW8ePVX.js +244 -0
- package/dist/{index-DPYzF8No.js → index-D0nFU6ln.js} +1 -1
- package/dist/{index-Cv0dYoWA.js → index-fFL3EyTx.js} +68 -105
- package/dist/{index-Dhl0c4JQ.js → index-jqxAE4Rp.js} +1 -1
- package/dist/{index-BPdhkx4l.js → index-sIR31szI.js} +1 -1
- package/dist/{index-BtG8YOzi.js → index-wIa5WSXJ.js} +27 -28
- package/dist/{index-CpxxO2-G.js → index-x9e-DyDf.js} +1 -1
- package/dist/{loading-DlPkAkzK.js → loading-BxJj39Hj.js} +3156 -3156
- package/dist/{lodash-Cjf6EG_s.js → lodash-CrYvSLZb.js} +1 -1
- package/dist/{membership-B4-9J74r.js → membership-DKQL_Qp9.js} +73 -84
- package/dist/{money-il542E4J.js → money-B1P0wtzb.js} +1 -1
- package/dist/{number-WhKft9Yv.js → number-Bc1eguaq.js} +3 -3
- package/dist/{rule-XS2i1LKt.js → rule-BblG87FW.js} +2 -2
- package/dist/{rule-builder-CdK4IIT9.js → rule-builder-BQdKD4Gy.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-owB8rrou.js → template-o2RQUsfw.js} +6 -6
- package/dist/{usePagination-CxpwPyMW.js → usePagination-BaqNzQhm.js} +1 -1
- package/dist/{xlsx-CbJTFamj.js → xlsx-DqRMXFBK.js} +309 -309
- package/package.json +1 -1
- package/dist/Analytic-CCtweUZA.js +0 -757
- package/dist/MainLayout-CWfQ53Qr.js +0 -41
- package/dist/MemberList-C2X8fM7F.js +0 -1729
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CE03Mh2P.js +0 -432
- package/dist/Store-CaWIsSZ3.js +0 -1506
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DkpguWBa.js +0 -136
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
- package/dist/index-_8VUWoAN.js +0 -245
- package/dist/zod-W_PvIofQ.js +0 -90
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as O, unref as
|
|
1
|
+
import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as O, unref as a, withCtx as N, createVNode as g, normalizeClass as U, createCommentVNode as oe, createElementVNode as C, toDisplayString as q, createElementBlock as L, Fragment as le, renderList as se, mergeModels as K, useModel as ie, watch as j, onBeforeMount as ce, h as c } from "vue";
|
|
2
2
|
import { components as S } from "@feedmepos/ui-library";
|
|
3
|
-
import { d as ue } from "./index-
|
|
4
|
-
import { a as X } from "./loading-
|
|
3
|
+
import { d as ue } from "./index-B64Y4rdW.js";
|
|
4
|
+
import { a as X } from "./loading-BxJj39Hj.js";
|
|
5
5
|
import { s as de } from "./index-Dbd4WA4r.js";
|
|
6
6
|
import { h as b } from "./moment-BWErdI6_.js";
|
|
7
7
|
import { s as Y } from "./index-CuvNtC_M.js";
|
|
8
|
-
import { f as H } from "./number-
|
|
9
|
-
import {
|
|
10
|
-
import { u as J, _ as Q } from "./usePagination-
|
|
8
|
+
import { f as H } from "./number-Bc1eguaq.js";
|
|
9
|
+
import { e as G, j as me, S as pe, h as fe, a as ge } from "./app-BSmDH0M7.js";
|
|
10
|
+
import { u as J, _ as Q } from "./usePagination-BaqNzQhm.js";
|
|
11
11
|
import { g as Z } from "./user-Bm4KttFq.js";
|
|
12
|
-
import { B as ee, a as te } from "./export-
|
|
12
|
+
import { B as ee, a as te } from "./export-Bf2h8rMP.js";
|
|
13
13
|
import { o as A } from "./objectId-dwaoBfJX.js";
|
|
14
14
|
function ye(o) {
|
|
15
15
|
let s = "";
|
|
@@ -137,7 +137,7 @@ const T = {
|
|
|
137
137
|
return R(), O(f, {
|
|
138
138
|
placement: o.placement || "bottom-end",
|
|
139
139
|
disabled: o.disabled == !0,
|
|
140
|
-
"model-value":
|
|
140
|
+
"model-value": a(d),
|
|
141
141
|
onMenuChanged: t[0] || (t[0] = (e) => d.value = e),
|
|
142
142
|
"close-on-click": !1
|
|
143
143
|
}, {
|
|
@@ -154,9 +154,9 @@ const T = {
|
|
|
154
154
|
outline: "",
|
|
155
155
|
size: "sm"
|
|
156
156
|
}, null, 8, ["name", "class"])) : oe("", !0),
|
|
157
|
-
C("div", ve, q(l.label) + " " + q(o.showItemLabel ?
|
|
157
|
+
C("div", ve, q(l.label) + " " + q(o.showItemLabel ? a(y) : ""), 1),
|
|
158
158
|
g(u, {
|
|
159
|
-
name:
|
|
159
|
+
name: a(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
160
160
|
class: U(l.class),
|
|
161
161
|
outline: "",
|
|
162
162
|
size: "sm"
|
|
@@ -167,7 +167,7 @@ const T = {
|
|
|
167
167
|
]),
|
|
168
168
|
default: N(() => [
|
|
169
169
|
g(w, {
|
|
170
|
-
"model-value": Object.keys(
|
|
170
|
+
"model-value": Object.keys(a(r)).length === l.items.length,
|
|
171
171
|
label: "All",
|
|
172
172
|
"has-checkbox": !0,
|
|
173
173
|
indeterminate: !0,
|
|
@@ -178,8 +178,8 @@ const T = {
|
|
|
178
178
|
value: e.value,
|
|
179
179
|
label: e.label,
|
|
180
180
|
"has-checkbox": !0,
|
|
181
|
-
"model-value":
|
|
182
|
-
"onUpdate:modelValue": (
|
|
181
|
+
"model-value": a(r)[e.value],
|
|
182
|
+
"onUpdate:modelValue": (n) => D(e.value)
|
|
183
183
|
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
184
184
|
]),
|
|
185
185
|
_: 1
|
|
@@ -225,7 +225,7 @@ const T = {
|
|
|
225
225
|
}, {
|
|
226
226
|
"trigger-button": N(() => [
|
|
227
227
|
g(m, {
|
|
228
|
-
label:
|
|
228
|
+
label: a(r),
|
|
229
229
|
icon: "calendar_month",
|
|
230
230
|
"right-icon": "keyboard_arrow_down",
|
|
231
231
|
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
@@ -292,8 +292,8 @@ const W = () => {
|
|
|
292
292
|
outline: !0,
|
|
293
293
|
size: "sm",
|
|
294
294
|
class: "cursor-pointer mr-4",
|
|
295
|
-
onClick: (
|
|
296
|
-
|
|
295
|
+
onClick: (n) => {
|
|
296
|
+
n.preventDefault(), n.stopPropagation(), X(e.row.original._id.toString());
|
|
297
297
|
}
|
|
298
298
|
}),
|
|
299
299
|
c(
|
|
@@ -317,7 +317,7 @@ const W = () => {
|
|
|
317
317
|
enableSorting: !1,
|
|
318
318
|
cell(e) {
|
|
319
319
|
var v, i, F, E;
|
|
320
|
-
const
|
|
320
|
+
const n = H(
|
|
321
321
|
e.row.original.expiryAmount.reduce(
|
|
322
322
|
(ne, re) => ne + re.amount,
|
|
323
323
|
e.row.original.amount ?? 0
|
|
@@ -332,10 +332,10 @@ const W = () => {
|
|
|
332
332
|
{
|
|
333
333
|
class: [
|
|
334
334
|
"pr-2",
|
|
335
|
-
+
|
|
335
|
+
+n > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
|
|
336
336
|
]
|
|
337
337
|
},
|
|
338
|
-
|
|
338
|
+
n
|
|
339
339
|
),
|
|
340
340
|
c("div", { class: "flex items-center" }, [
|
|
341
341
|
e.row.original.expiryAmount.length > 0 ? c(
|
|
@@ -363,13 +363,13 @@ const W = () => {
|
|
|
363
363
|
maxWidth: "200px"
|
|
364
364
|
},
|
|
365
365
|
cell(e) {
|
|
366
|
-
const
|
|
366
|
+
const n = T.formattedType(e.row.original);
|
|
367
367
|
return c("div", { class: "flex items-center" }, [
|
|
368
|
-
c("div", { class: "truncate text-ellipsis" },
|
|
369
|
-
|
|
368
|
+
c("div", { class: "truncate text-ellipsis" }, n),
|
|
369
|
+
n.length > 20 ? c(
|
|
370
370
|
S.FmTooltip,
|
|
371
371
|
{
|
|
372
|
-
content:
|
|
372
|
+
content: n
|
|
373
373
|
},
|
|
374
374
|
[
|
|
375
375
|
c(S.FmIcon, {
|
|
@@ -397,20 +397,17 @@ const W = () => {
|
|
|
397
397
|
{
|
|
398
398
|
header: "Phone No.",
|
|
399
399
|
accessorKey: "pf_user.phoneNumber",
|
|
400
|
-
accessorFn: (e) =>
|
|
401
|
-
var a;
|
|
402
|
-
return ((a = e == null ? void 0 : e.pf_user) == null ? void 0 : a.phoneNumber) || "";
|
|
403
|
-
}
|
|
400
|
+
accessorFn: (e) => e.pf_user.phoneNumber
|
|
404
401
|
},
|
|
405
402
|
{
|
|
406
403
|
accessorFn: (e) => e.ref,
|
|
407
404
|
header: "References",
|
|
408
405
|
accessorKey: "ref",
|
|
409
406
|
cell(e) {
|
|
410
|
-
var
|
|
407
|
+
var n, h;
|
|
411
408
|
return c("div", { class: "flex items-center justify-between gap-4" }, [
|
|
412
409
|
c("div", { class: "flex items-center" }, [
|
|
413
|
-
(
|
|
410
|
+
(n = e.row.original.metadata) != null && n.remark ? c(
|
|
414
411
|
S.FmTooltip,
|
|
415
412
|
{
|
|
416
413
|
content: (h = e.row.original.metadata) == null ? void 0 : h.remark
|
|
@@ -438,14 +435,14 @@ const W = () => {
|
|
|
438
435
|
},
|
|
439
436
|
source: []
|
|
440
437
|
}), { tableMeta: y, rowData: D, onSort: I, debouncedFetchData: m, onSearch: t } = J(async (e) => {
|
|
441
|
-
const
|
|
438
|
+
const n = {
|
|
442
439
|
...r.value,
|
|
443
440
|
user: l.user,
|
|
444
441
|
dateRange: {
|
|
445
442
|
start: new Date(r.value.dateRange.startDate).toISOString(),
|
|
446
443
|
end: new Date(r.value.dateRange.endDate).toISOString()
|
|
447
444
|
}
|
|
448
|
-
}, h = await M.readAll(e,
|
|
445
|
+
}, h = await M.readAll(e, n);
|
|
449
446
|
return {
|
|
450
447
|
resources: h.resources.map((v) => {
|
|
451
448
|
const i = u.value.find((F) => F._id === v.ref);
|
|
@@ -474,27 +471,27 @@ const W = () => {
|
|
|
474
471
|
};
|
|
475
472
|
await te({
|
|
476
473
|
exporter: new _e(),
|
|
477
|
-
readFunction: (
|
|
478
|
-
transformRecord: (
|
|
474
|
+
readFunction: (n) => M.readAll(n, e),
|
|
475
|
+
transformRecord: (n) => {
|
|
479
476
|
var h, v, i;
|
|
480
477
|
return {
|
|
481
|
-
TransactionID:
|
|
482
|
-
CreatedAt: b(A(
|
|
478
|
+
TransactionID: n._id,
|
|
479
|
+
CreatedAt: b(A(n._id.toString())).format(
|
|
483
480
|
"D MMM YYYY, hh:mmA"
|
|
484
481
|
),
|
|
485
482
|
Amount: H(
|
|
486
|
-
|
|
483
|
+
n.expiryAmount.reduce(
|
|
487
484
|
(F, E) => F + E.amount,
|
|
488
|
-
|
|
485
|
+
n.amount ?? 0
|
|
489
486
|
),
|
|
490
487
|
2
|
|
491
488
|
),
|
|
492
|
-
Type: T.formattedType(
|
|
493
|
-
Source: Y(T.getReason(
|
|
494
|
-
User: ((h =
|
|
495
|
-
"Phone No.": ((v =
|
|
496
|
-
References:
|
|
497
|
-
Remark: ((i =
|
|
489
|
+
Type: T.formattedType(n),
|
|
490
|
+
Source: Y(T.getReason(n.source)),
|
|
491
|
+
User: ((h = n.pf_user) == null ? void 0 : h.name) || "",
|
|
492
|
+
"Phone No.": ((v = n.pf_user) == null ? void 0 : v.phoneNumber) || "",
|
|
493
|
+
References: n.ref,
|
|
494
|
+
Remark: ((i = n.metadata) == null ? void 0 : i.remark) || ""
|
|
498
495
|
};
|
|
499
496
|
},
|
|
500
497
|
filename: "transactions"
|
|
@@ -507,14 +504,14 @@ const W = () => {
|
|
|
507
504
|
}
|
|
508
505
|
return ce(async () => {
|
|
509
506
|
await s.readLocations(), await m();
|
|
510
|
-
}), (e,
|
|
507
|
+
}), (e, n) => {
|
|
511
508
|
const h = x("FmSearch"), v = x("FmButton");
|
|
512
509
|
return R(), L("div", null, [
|
|
513
510
|
C("div", Se, [
|
|
514
511
|
g(h, {
|
|
515
512
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
516
|
-
modelValue:
|
|
517
|
-
"onUpdate:modelValue":
|
|
513
|
+
modelValue: a(r).search,
|
|
514
|
+
"onUpdate:modelValue": n[0] || (n[0] = (i) => a(r).search = i),
|
|
518
515
|
placeholder: "Search",
|
|
519
516
|
collapsible: ""
|
|
520
517
|
}, null, 8, ["modelValue"]),
|
|
@@ -529,17 +526,17 @@ const W = () => {
|
|
|
529
526
|
g(B, {
|
|
530
527
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
531
528
|
"right-icon": "keyboard_arrow_down",
|
|
532
|
-
modelValue:
|
|
533
|
-
"onUpdate:modelValue":
|
|
529
|
+
modelValue: a(r)["metadata.location"],
|
|
530
|
+
"onUpdate:modelValue": n[1] || (n[1] = (i) => a(r)["metadata.location"] = i),
|
|
534
531
|
icon: "storefront",
|
|
535
532
|
"show-item-label": !0,
|
|
536
|
-
items:
|
|
533
|
+
items: a(w)
|
|
537
534
|
}, null, 8, ["modelValue", "items"]),
|
|
538
535
|
g(B, {
|
|
539
536
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
540
537
|
"right-icon": "keyboard_arrow_down",
|
|
541
|
-
modelValue:
|
|
542
|
-
"onUpdate:modelValue":
|
|
538
|
+
modelValue: a(r)["pf_collectible.type"],
|
|
539
|
+
"onUpdate:modelValue": n[2] || (n[2] = (i) => a(r)["pf_collectible.type"] = i),
|
|
543
540
|
label: "Type: ",
|
|
544
541
|
"show-item-label": !0,
|
|
545
542
|
items: [
|
|
@@ -556,27 +553,27 @@ const W = () => {
|
|
|
556
553
|
g(B, {
|
|
557
554
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
558
555
|
"right-icon": "keyboard_arrow_down",
|
|
559
|
-
modelValue:
|
|
560
|
-
"onUpdate:modelValue":
|
|
556
|
+
modelValue: a(r).source,
|
|
557
|
+
"onUpdate:modelValue": n[3] || (n[3] = (i) => a(r).source = i),
|
|
561
558
|
label: "Source: ",
|
|
562
559
|
"show-item-label": !0,
|
|
563
|
-
items:
|
|
560
|
+
items: a(_)
|
|
564
561
|
}, null, 8, ["modelValue", "items"]),
|
|
565
562
|
g(ae, {
|
|
566
563
|
"model-value": {
|
|
567
|
-
startDate:
|
|
568
|
-
endDate:
|
|
564
|
+
startDate: a(r).dateRange.startDate,
|
|
565
|
+
endDate: a(r).dateRange.endDate
|
|
569
566
|
},
|
|
570
|
-
"onUpdate:modelValue":
|
|
571
|
-
startDate:
|
|
572
|
-
endDate:
|
|
567
|
+
"onUpdate:modelValue": n[4] || (n[4] = (i) => a(r).dateRange = {
|
|
568
|
+
startDate: a(b)(i.startDate).startOf("d").toISOString(),
|
|
569
|
+
endDate: a(b)(i.endDate).endOf("d").toISOString()
|
|
573
570
|
})
|
|
574
571
|
}, null, 8, ["model-value"])
|
|
575
572
|
]),
|
|
576
573
|
g(h, {
|
|
577
574
|
class: "xs:hidden",
|
|
578
|
-
modelValue:
|
|
579
|
-
"onUpdate:modelValue":
|
|
575
|
+
modelValue: a(r).search,
|
|
576
|
+
"onUpdate:modelValue": n[5] || (n[5] = (i) => a(r).search = i),
|
|
580
577
|
placeholder: "Search",
|
|
581
578
|
collapsible: ""
|
|
582
579
|
}, null, 8, ["modelValue"]),
|
|
@@ -589,18 +586,18 @@ const W = () => {
|
|
|
589
586
|
])
|
|
590
587
|
]),
|
|
591
588
|
g(Q, {
|
|
592
|
-
loading:
|
|
593
|
-
"row-data":
|
|
594
|
-
"row-count":
|
|
589
|
+
loading: a(y).isLoading,
|
|
590
|
+
"row-data": a(D),
|
|
591
|
+
"row-count": a(y).totalRows,
|
|
595
592
|
"column-defs": d.filter(
|
|
596
593
|
(i) => !l.user || i.header !== "User" && i.header !== "Phone No."
|
|
597
594
|
),
|
|
598
|
-
"page-count":
|
|
599
|
-
"page-index":
|
|
600
|
-
"page-size":
|
|
595
|
+
"page-count": a(y).pageCount,
|
|
596
|
+
"page-index": a(y).pageIndex,
|
|
597
|
+
"page-size": a(y).pageSize,
|
|
601
598
|
"shrink-at": !1,
|
|
602
|
-
onSortChange:
|
|
603
|
-
onPageChange:
|
|
599
|
+
onSortChange: a(I),
|
|
600
|
+
onPageChange: n[6] || (n[6] = (i) => a(m)({
|
|
604
601
|
pageSize: i.pageSize,
|
|
605
602
|
pageIndex: i.pageIndex
|
|
606
603
|
}))
|
|
@@ -749,16 +746,16 @@ const Ce = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
749
746
|
C("div", Ce, [
|
|
750
747
|
C("div", Re, [
|
|
751
748
|
g(ae, {
|
|
752
|
-
modelValue:
|
|
753
|
-
"onUpdate:modelValue": u[0] || (u[0] = (f) =>
|
|
749
|
+
modelValue: a(p).dateRange,
|
|
750
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => a(p).dateRange = f)
|
|
754
751
|
}, null, 8, ["modelValue"])
|
|
755
752
|
]),
|
|
756
753
|
C("div", Fe, [
|
|
757
754
|
g(_, {
|
|
758
|
-
modelValue:
|
|
755
|
+
modelValue: a(d).searchValue,
|
|
759
756
|
"onUpdate:modelValue": [
|
|
760
|
-
u[1] || (u[1] = (f) =>
|
|
761
|
-
|
|
757
|
+
u[1] || (u[1] = (f) => a(d).searchValue = f),
|
|
758
|
+
a(I)
|
|
762
759
|
],
|
|
763
760
|
placeholder: "Search",
|
|
764
761
|
collapsible: ""
|
|
@@ -771,18 +768,18 @@ const Ce = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
771
768
|
])
|
|
772
769
|
]),
|
|
773
770
|
g(Q, {
|
|
774
|
-
loading:
|
|
775
|
-
"row-data":
|
|
776
|
-
"row-count":
|
|
771
|
+
loading: a(d).isLoading,
|
|
772
|
+
"row-data": a(r),
|
|
773
|
+
"row-count": a(d).totalRows,
|
|
777
774
|
"column-defs": l.filter(
|
|
778
775
|
(f) => !s.user || f.header !== "User" && f.header !== "Phone No."
|
|
779
776
|
),
|
|
780
|
-
"page-count":
|
|
781
|
-
"page-index":
|
|
782
|
-
"page-size":
|
|
777
|
+
"page-count": a(d).pageCount,
|
|
778
|
+
"page-index": a(d).pageIndex,
|
|
779
|
+
"page-size": a(d).pageSize,
|
|
783
780
|
"shrink-at": !1,
|
|
784
|
-
onSortChange:
|
|
785
|
-
onPageChange: u[2] || (u[2] = (f) =>
|
|
781
|
+
onSortChange: a(y),
|
|
782
|
+
onPageChange: u[2] || (u[2] = (f) => a(D)({
|
|
786
783
|
pageSize: f.pageSize,
|
|
787
784
|
pageIndex: f.pageIndex
|
|
788
785
|
}))
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { defineComponent as C, ref as U, computed as B, resolveComponent as g, openBlock as o, createElementBlock as u, Fragment as v, toDisplayString as L, createCommentVNode as N, createElementVNode as E, createVNode as h, unref as d, renderList as x, createBlock as S, isRef as I, withCtx as p } from "vue";
|
|
2
|
+
import { a as A } from "./app-BSmDH0M7.js";
|
|
3
|
+
function M(e, m, t) {
|
|
4
|
+
return e.some(
|
|
5
|
+
t instanceof Function ? t : (a) => a === m
|
|
6
|
+
) || e.push(m), e;
|
|
7
|
+
}
|
|
8
|
+
function w(e, m, t) {
|
|
9
|
+
return e.filter(
|
|
10
|
+
t instanceof Function ? (a) => !t(a) : (a) => a !== m
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
const j = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "fm-typo-en-body-lg-400"
|
|
16
|
+
}, q = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "space-y-4"
|
|
19
|
+
}, D = { key: 0 }, O = { key: 1 }, R = { key: 2 }, z = /* @__PURE__ */ C({
|
|
20
|
+
__name: "TargetLocationInput",
|
|
21
|
+
props: {
|
|
22
|
+
label: {
|
|
23
|
+
type: String
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "select"
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: !0
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:model-value"],
|
|
35
|
+
setup(e, { emit: m }) {
|
|
36
|
+
const t = A(), a = e, f = m;
|
|
37
|
+
function k(y, n) {
|
|
38
|
+
const i = y ? M(a.modelValue || [], n.toString()) : w(
|
|
39
|
+
a.modelValue || t.locations.map((s) => s._id.toString()),
|
|
40
|
+
n.toString()
|
|
41
|
+
);
|
|
42
|
+
return f("update:model-value", i);
|
|
43
|
+
}
|
|
44
|
+
const c = U(!1), F = B(() => {
|
|
45
|
+
var i, s;
|
|
46
|
+
const n = ((i = a.modelValue) == null ? void 0 : i.slice(0, 5).map((r) => {
|
|
47
|
+
var V;
|
|
48
|
+
return ((V = t.locationById(r)) == null ? void 0 : V.name) || r;
|
|
49
|
+
})) || [];
|
|
50
|
+
return a.modelValue && ((s = a.modelValue) == null ? void 0 : s.length) > 5 && n.push(`+${a.modelValue.length - 5} more`), n;
|
|
51
|
+
});
|
|
52
|
+
return (y, n) => {
|
|
53
|
+
const i = g("FmCheckbox"), s = g("FmChip"), r = g("FmField"), V = g("FmMenu");
|
|
54
|
+
return o(), u(v, null, [
|
|
55
|
+
e.label ? (o(), u("div", j, L(e.label), 1)) : N("", !0),
|
|
56
|
+
e.type === "checkbox" ? (o(), u("div", q, [
|
|
57
|
+
E("div", null, [
|
|
58
|
+
h(i, {
|
|
59
|
+
value: null,
|
|
60
|
+
indeterminate: e.modelValue != null && e.modelValue.length > 0 && e.modelValue.length < d(t).locations.length,
|
|
61
|
+
label: "All locations",
|
|
62
|
+
"model-value": e.modelValue == null || e.modelValue.length === d(t).locations.length,
|
|
63
|
+
"onUpdate:modelValue": n[0] || (n[0] = (l) => f("update:model-value", l ? null : []))
|
|
64
|
+
}, null, 8, ["indeterminate", "model-value"])
|
|
65
|
+
]),
|
|
66
|
+
(o(!0), u(v, null, x(d(t).locations, (l) => (o(), u("div", {
|
|
67
|
+
key: l._id.toString()
|
|
68
|
+
}, [
|
|
69
|
+
h(i, {
|
|
70
|
+
value: l._id.toString(),
|
|
71
|
+
label: l.name,
|
|
72
|
+
"model-value": !e.modelValue || e.modelValue.includes(l._id.toString()),
|
|
73
|
+
"onUpdate:modelValue": (b) => k(b, l._id.toString())
|
|
74
|
+
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
|
|
75
|
+
]))), 128))
|
|
76
|
+
])) : (o(), S(V, {
|
|
77
|
+
key: 2,
|
|
78
|
+
modelValue: d(c),
|
|
79
|
+
"onUpdate:modelValue": n[2] || (n[2] = (l) => I(c) ? c.value = l : null),
|
|
80
|
+
onMenuChanged: n[3] || (n[3] = (l) => c.value = l),
|
|
81
|
+
placement: "top-end"
|
|
82
|
+
}, {
|
|
83
|
+
"menu-button": p(() => [
|
|
84
|
+
h(r, {
|
|
85
|
+
"append-icon": d(c) ? "expand_more" : "expand_less",
|
|
86
|
+
class: "!h-auto"
|
|
87
|
+
}, {
|
|
88
|
+
default: p(() => [
|
|
89
|
+
!e.modelValue || e.modelValue.length == d(t).locations.length ? (o(), u("div", D, " All Locations ")) : e.modelValue.length ? (o(), u("div", R, [
|
|
90
|
+
(o(!0), u(v, null, x(d(F), (l) => (o(), S(s, {
|
|
91
|
+
key: l,
|
|
92
|
+
label: l,
|
|
93
|
+
class: "max-w-[130px] text-ellipsis"
|
|
94
|
+
}, null, 8, ["label"]))), 128))
|
|
95
|
+
])) : (o(), u("div", O, "No Locations"))
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["append-icon"])
|
|
99
|
+
]),
|
|
100
|
+
default: p(() => [
|
|
101
|
+
h(i, {
|
|
102
|
+
value: null,
|
|
103
|
+
indeterminate: e.modelValue != null && e.modelValue.length > 0 && e.modelValue.length < d(t).locations.length,
|
|
104
|
+
label: "All locations",
|
|
105
|
+
"model-value": e.modelValue == null || e.modelValue.length === d(t).locations.length,
|
|
106
|
+
"onUpdate:modelValue": n[1] || (n[1] = (l) => f("update:model-value", l ? null : []))
|
|
107
|
+
}, null, 8, ["indeterminate", "model-value"]),
|
|
108
|
+
(o(!0), u(v, null, x(d(t).locations, (l) => (o(), S(i, {
|
|
109
|
+
key: l._id.toString(),
|
|
110
|
+
value: l._id.toString(),
|
|
111
|
+
label: l.name,
|
|
112
|
+
"model-value": !e.modelValue || e.modelValue.includes(l._id.toString()),
|
|
113
|
+
"onUpdate:modelValue": (b) => k(b, l._id.toString())
|
|
114
|
+
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
}, 8, ["modelValue"]))
|
|
118
|
+
], 64);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
z as _
|
|
124
|
+
};
|