@feedmepos/mf-inventory-portal 0.0.22-dev.2 → 0.0.22-dev.3

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 (42) hide show
  1. package/dist/{ApprovalView-D7WEr35k.js → ApprovalView-BnkFRJgX.js} +19 -19
  2. package/dist/{BindingsDialog-C-3uO6pD.js → BindingsDialog-BDzmf8Wr.js} +1 -1
  3. package/dist/{BindingsPicker-B3tGisCE.js → BindingsPicker-CRGFd-d8.js} +1 -1
  4. package/dist/{BindingsTable-CPtiH3vj.js → BindingsTable-BnHju77G.js} +1 -1
  5. package/dist/ClosingTemplateView-D2EIa9YG.js +1030 -0
  6. package/dist/Entry.vue.d.ts +2 -0
  7. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ohHZLOuR.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BRV9dZhu.js} +13 -15
  8. package/dist/{IngredientsView-D-EKGLq9.js → IngredientsView-CiUpjKmC.js} +3 -3
  9. package/dist/{IntegrationView-BVAO_vch.js → IntegrationView-UySDEAnh.js} +2 -2
  10. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJYmB7Ct.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cxy6vo9D.js} +1 -1
  11. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BxkM-SOw.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ChrCZc0C.js} +1 -1
  12. package/dist/{PurchaseOrderPrintPreview-CP-mK62z.js → PurchaseOrderPrintPreview-CGxMILW0.js} +1 -1
  13. package/dist/{ReceiveRequestView-x8WTvuDk.js → ReceiveRequestView-BHOC-ZLV.js} +13 -13
  14. package/dist/{RecipeView-BysIWI1W.js → RecipeView-lgrm1J9x.js} +3 -3
  15. package/dist/Standalone.vue.d.ts +2 -0
  16. package/dist/{StockView-SyWxT4Ee.js → StockView-BcXcQZpl.js} +6 -6
  17. package/dist/{SupplierView-a0HAZJau.js → SupplierView-Bl13ZM-9.js} +3 -3
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-ckp8gcT_.js → TransferDetails.vue_vue_type_script_setup_true_lang-SXFiNrtm.js} +4 -4
  19. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BSvpuWY9.js → TransferDialog.vue_vue_type_script_setup_true_lang-DSBEn-Mt.js} +5 -5
  20. package/dist/{TransferTemplateView-BGi6zd6d.js → TransferTemplateView-C_eqQ9a8.js} +45 -165
  21. package/dist/{UnitView-B3c7W5lw.js → UnitView-DG8PGv5Y.js} +4 -4
  22. package/dist/{WarehouseView-DDV-yslF.js → WarehouseView-CeS8jrgw.js} +16 -16
  23. package/dist/api/closing-template.d.ts +14 -0
  24. package/dist/{app-DURkcZal.js → app-DYhspC_r.js} +1249 -1221
  25. package/dist/app.js +3 -3
  26. package/dist/{decimal-BGJlFDm8.js → decimal-DwEh3AcZ.js} +1 -1
  27. package/dist/{defineDeepModel-pATZSiCT.js → defineDeepModel-htf7zxRR.js} +1 -1
  28. package/dist/extensions/promises.d.ts +14 -0
  29. package/dist/{format-time-from-id-BCAuJEq2.js → format-time-from-id-1BxShIsX.js} +1 -1
  30. package/dist/helper/date2.d.ts +1 -0
  31. package/dist/{id-to-date-CVHmTOJk.js → id-to-date-CzSDsYm2.js} +1 -1
  32. package/dist/{purchase-order-transaction-type-DvSpCSXr.js → purchase-order-transaction-type-lwIoC03T.js} +10 -10
  33. package/dist/style.css +1 -1
  34. package/dist/{supplier-DmBbGAwf.js → supplier-DegAxD_n.js} +1 -1
  35. package/dist/tsconfig.app.tsbuildinfo +1 -1
  36. package/dist/{use-template-enabled-locations-BiuOdu1M.js → use-template-enabled-locations-B2ZtZAoX.js} +1 -1
  37. package/dist/views/closing-template/components/closing-template-publish/ClosingTemplatePublish.vue.d.ts +6 -0
  38. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +65 -1
  39. package/dist/{xlsx-1DLm6bBD.js → xlsx-CSS2klUs.js} +1 -1
  40. package/dist/{xlsx.util-DLtch7r5.js → xlsx.util-CeY18XxV.js} +2 -2
  41. package/package.json +1 -1
  42. package/dist/ClosingTemplateView-Df0lgpjS.js +0 -928
@@ -1,19 +1,19 @@
1
- import { defineComponent as J, onMounted as _e, computed as O, ref as U, watch as fe, inject as Ke, resolveComponent as C, openBlock as w, createElementBlock as P, createElementVNode as s, createVNode as u, withCtx as D, renderSlot as Re, withDirectives as Ae, normalizeClass as me, vModelText as Oe, reactive as Ze, h as Z, toDisplayString as T, unref as e, createBlock as N, createCommentVNode as H, isRef as xe, Fragment as ce, renderList as ve, onUnmounted as Je, normalizeStyle as Xe, Teleport as et, mergeProps as Pe, normalizeProps as tt, guardReactiveProps as ot } from "vue";
2
- import { u as st, _ as nt, a as lt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ohHZLOuR.js";
1
+ import { defineComponent as J, onMounted as _e, computed as O, ref as U, watch as fe, inject as We, resolveComponent as C, openBlock as w, createElementBlock as P, createElementVNode as s, createVNode as u, withCtx as D, renderSlot as Re, withDirectives as Ae, normalizeClass as me, vModelText as Oe, reactive as Ke, h as Z, toDisplayString as T, unref as e, createBlock as N, createCommentVNode as H, isRef as xe, Fragment as ce, renderList as ve, onUnmounted as Ze, normalizeStyle as Je, Teleport as Xe, mergeProps as Pe, normalizeProps as et, guardReactiveProps as tt } from "vue";
2
+ import { u as ot, _ as st, a as nt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BRV9dZhu.js";
3
3
  import { useI18n as X } from "@feedmepos/mf-common";
4
- import { P as pe, a as at, f as rt, b as Be, c as it } from "./purchase-order-transaction-type-DvSpCSXr.js";
4
+ import { P as pe, a as lt, f as at, b as Be, c as rt } from "./purchase-order-transaction-type-lwIoC03T.js";
5
5
  import { F as ne, R as qe } from "./row-action.enum-PMKMRrZR.js";
6
- import { $ as ye, t as Ue, I as ut, a0 as dt, a1 as mt, a as G, D as Ee, R as be, a2 as ct, a3 as pt, r as de, a4 as ft, l as yt, A as Ne, M as vt, b as he, u as bt, j as ge, y as _t, a5 as ie, a6 as xt, G as ht, a7 as gt } from "./app-DURkcZal.js";
7
- import { useBreakpoints as ze, components as ue, useDialog as kt, useSnackbar as wt, useProxiedModel as je } from "@feedmepos/ui-library";
6
+ import { a0 as ye, t as Ue, I as it, a1 as ut, a2 as dt, a as G, D as Ee, R as be, a3 as mt, a4 as ct, r as de, a5 as pt, l as ft, A as Ne, M as yt, b as he, u as vt, j as ge, y as bt, a6 as ie, a7 as _t, G as xt, a8 as ht } from "./app-DYhspC_r.js";
7
+ import { components as ue, useDialog as gt, useSnackbar as kt, useProxiedModel as ze, useBreakpoints as wt } from "@feedmepos/ui-library";
8
8
  import { storeToRefs as Ft } from "pinia";
9
- import { d as Qe } from "./defineDeepModel-pATZSiCT.js";
10
- import { c as He, _ as Tt } from "./TransferDialog.vue_vue_type_script_setup_true_lang-BSvpuWY9.js";
9
+ import { d as je } from "./defineDeepModel-htf7zxRR.js";
10
+ import { c as Qe, _ as Tt } from "./TransferDialog.vue_vue_type_script_setup_true_lang-DSBEn-Mt.js";
11
11
  import { useRouter as Ct } from "vue-router";
12
- import { u as $t } from "./supplier-DmBbGAwf.js";
13
- import { F as E, _ as Ge } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
14
- import { _ as St } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BxkM-SOw.js";
15
- import { u as Ye } from "./use-template-enabled-locations-BiuOdu1M.js";
16
- import { f as Mt } from "./format-time-from-id-BCAuJEq2.js";
12
+ import { u as $t } from "./supplier-DegAxD_n.js";
13
+ import { F as E, _ as He } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
14
+ import { _ as St } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-ChrCZc0C.js";
15
+ import { u as Ge } from "./use-template-enabled-locations-B2ZtZAoX.js";
16
+ import { f as Mt } from "./format-time-from-id-1BxShIsX.js";
17
17
  const It = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Lt = { class: "flex-1" }, Vt = { class: "flex items-center" }, Rt = { class: "flex-1" }, At = { class: "flex-1" }, Ot = /* @__PURE__ */ J({
18
18
  __name: "FmMinMaxInput",
19
19
  props: {
@@ -52,7 +52,7 @@ const It = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Lt = { c
52
52
  helperState: {}
53
53
  },
54
54
  setup(f) {
55
- const y = f, d = Qe("modelValue"), l = ut();
55
+ const y = f, d = je("modelValue"), l = it();
56
56
  _e(() => {
57
57
  const { min: p, max: o } = d ?? {};
58
58
  if (!(!p || !o) && p.precision !== o.precision) {
@@ -67,8 +67,8 @@ const It = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Lt = { c
67
67
  ...d
68
68
  })), n = (p) => {
69
69
  if (!p) return "";
70
- const o = dt(p), t = _.value, r = ye(o, t);
71
- return mt(
70
+ const o = ut(p), t = _.value, r = ye(o, t);
71
+ return dt(
72
72
  +G(r),
73
73
  r.precision
74
74
  );
@@ -87,7 +87,7 @@ const It = { class: "flex flex-col" }, Dt = { class: "flex flex-col" }, Lt = { c
87
87
  t.max = null;
88
88
  d.min = t.min, d.max = t.max;
89
89
  });
90
- const L = Symbol.for("fm:form-state"), S = Ke(L, null), M = O(() => y.disabled ?? (S == null ? void 0 : S.getDisabled()) ?? !1), I = U(), h = U(), v = U(!1), g = U(!1), R = O(() => v.value || g.value), q = O(() => [...[
90
+ const L = Symbol.for("fm:form-state"), S = We(L, null), M = O(() => y.disabled ?? (S == null ? void 0 : S.getDisabled()) ?? !1), I = U(), h = U(), v = U(!1), g = U(!1), R = O(() => v.value || g.value), q = O(() => [...[
91
91
  function() {
92
92
  return typeof l(a.value) == "string" || typeof l(F.value) == "string" ? "Must be a number" : !0;
93
93
  },
@@ -178,12 +178,12 @@ function Bt(f, y) {
178
178
  }
179
179
  var V = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.DefaultAmount = "DefaultAmount", f.Limit = "Limit", f.MinimumAmount = "MinimumAmount", f.Step = "Step", f.Cost = "Cost", f.Delete = "Delete", f))(V || {});
180
180
  function qt(f) {
181
- const { t: y } = X(), d = Ze({});
182
- ze(), _e(() => {
181
+ const { t: y } = X(), d = Ke({});
182
+ _e(() => {
183
183
  for (const c of f.items) {
184
184
  if (!c.totalCost)
185
185
  continue;
186
- const n = He(c.sku, c.quantity, c.measurement, {
186
+ const n = Qe(c.sku, c.quantity, c.measurement, {
187
187
  supplier: f.supplier
188
188
  }), a = c.totalCost ?? Ee.reset();
189
189
  n ? d[c.sku._id] = n.amount !== a.amount || n.precision !== a.precision : d[c.sku._id] = !0;
@@ -239,7 +239,7 @@ function qt(f) {
239
239
  minSize: 200,
240
240
  cell(c) {
241
241
  const n = c.row.original;
242
- return Z(ct, {
242
+ return Z(mt, {
243
243
  style: {
244
244
  flex: "1 1 0%"
245
245
  },
@@ -258,7 +258,7 @@ function qt(f) {
258
258
  });
259
259
  },
260
260
  rules: [
261
- pt(
261
+ ct(
262
262
  +G(
263
263
  n.minimumQuantity ?? {
264
264
  amount: 1,
@@ -266,7 +266,7 @@ function qt(f) {
266
266
  }
267
267
  )
268
268
  ),
269
- ft(
269
+ pt(
270
270
  n.maximumQuantity ? +G(n.maximumQuantity) : 1 / 0
271
271
  )
272
272
  ],
@@ -324,7 +324,7 @@ function qt(f) {
324
324
  "onUpdate:modelValue": (a) => {
325
325
  f.updateItem({
326
326
  ...n,
327
- quantityStep: yt(+a)
327
+ quantityStep: ft(+a)
328
328
  });
329
329
  },
330
330
  rules: [
@@ -332,132 +332,12 @@ function qt(f) {
332
332
  amount: 1,
333
333
  precision: de(n.sku.unit, n.measurement)
334
334
  }),
335
- vt(n.sku.unit, n.measurement)
335
+ yt(n.sku.unit, n.measurement)
336
336
  ]
337
337
  });
338
338
  },
339
339
  enableSorting: !1
340
340
  },
341
- // {
342
- // id: ItemColumn.Cost,
343
- // header: getTotalCostHeader,
344
- // size: 180,
345
- // cell(cellProps) {
346
- // const row = cellProps.row.original
347
- // const showAutoCalculate = canAutoCalculate(row.sku)
348
- // const isMobile = breakpoints.value.xs || breakpoints.value.sm
349
- // if (!manualTotalCost[row.sku._id] && showAutoCalculate) {
350
- // return h(
351
- // 'div',
352
- // {
353
- // class: 'flex gap-4 fm-typo-en-body-md-400 items-center',
354
- // key: row.sku._id
355
- // },
356
- // [
357
- // h(components.FmButton, {
358
- // prependIcon: 'edit',
359
- // variant: FmButtonVariant.Tertiary,
360
- // onClick() {
361
- // controller.updateItem({
362
- // ...row,
363
- // totalCost: calculateDefaultCost(row.sku, row.quantity, row.measurement, {
364
- // supplier: controller.supplier
365
- // })
366
- // })
367
- // manualTotalCost[row.sku._id] = true
368
- // },
369
- // disabled: controller.disabled
370
- // }),
371
- // h(
372
- // 'div',
373
- // {
374
- // class: 'flex flex-col'
375
- // },
376
- // [
377
- // h(
378
- // 'span',
379
- // {
380
- // class: [controller.disabled ? 'text-fm-color-typo-disabled' : '']
381
- // },
382
- // isMobile
383
- // ? adjustmentCurrencyFormat(
384
- // calculateDefaultCost(row.sku, row.quantity, row.measurement, {
385
- // supplier: controller.supplier
386
- // })
387
- // )
388
- // : adjustmentAmountFormat(
389
- // calculateDefaultCost(row.sku, row.quantity, row.measurement, {
390
- // supplier: controller.supplier
391
- // })
392
- // )
393
- // ),
394
- // h(
395
- // 'span',
396
- // {
397
- // class: [
398
- // 'fm-typo-en-body-sm-400',
399
- // controller.disabled
400
- // ? 'text-fm-color-typo-disabled'
401
- // : 'text-fm-color-neutral-gray-400'
402
- // ]
403
- // },
404
- // t('inventory.transfer.form.items.autoCalculated')
405
- // )
406
- // ]
407
- // )
408
- // ]
409
- // )
410
- // }
411
- // return h(
412
- // components.FmTextField,
413
- // {
414
- // modelValue: adjustmentAmountFormat(row.totalCost ?? { amount: 0, precision: 0 }),
415
- // key: row.sku._id,
416
- // 'onUpdate:modelValue': (value: string) => {
417
- // controller.updateItem({
418
- // ...row,
419
- // totalCost: {
420
- // ...toAdjustmentAmount(+value),
421
- // currency: getCurrency()
422
- // }
423
- // })
424
- // },
425
- // rules: [AtLeast(0), MaximumPrecision(2)]
426
- // },
427
- // {
428
- // prepend() {
429
- // if (!isMobile) return null
430
- // return h(
431
- // 'div',
432
- // {
433
- // class: [
434
- // 'text-fm-typo-en-body-lg-400',
435
- // controller.disabled ? 'text-fm-color-typo-disabled' : ''
436
- // ]
437
- // },
438
- // getFormattedCurrency()
439
- // )
440
- // },
441
- // append() {
442
- // if (!showAutoCalculate) return null
443
- // return h(components.FmButton, {
444
- // prependIcon: 'close',
445
- // variant: 'tertiary',
446
- // onClick() {
447
- // controller.updateItem({
448
- // ...row,
449
- // totalCost: null
450
- // })
451
- // manualTotalCost[row.sku._id] = false
452
- // },
453
- // disabled: controller.disabled
454
- // })
455
- // }
456
- // }
457
- // )
458
- // },
459
- // enableSorting: false
460
- // },
461
341
  {
462
342
  id: "Delete",
463
343
  header: "",
@@ -596,7 +476,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
596
476
  disabled: { type: Boolean }
597
477
  },
598
478
  setup(f, { expose: y }) {
599
- const d = f, l = Qe(), { t: _ } = X(), c = ge(), n = bt(), a = $t(), F = O(() => c.businessLevel);
479
+ const d = f, l = je(), { t: _ } = X(), c = ge(), n = vt(), a = $t(), F = O(() => c.businessLevel);
600
480
  fe(
601
481
  () => d.modelValue,
602
482
  (o) => {
@@ -605,7 +485,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
605
485
  ), c.watchLocation(async () => {
606
486
  location && (l.purchaseOrder.supplier || (l.purchaseOrder.supplier = a.suppliers.find((o) => o) ?? l.purchaseOrder.supplier));
607
487
  });
608
- const L = kt(), { enabledLocations: S, enabledLocationsSwitch: M, promptSelectLocations: I, removeLocation: h } = Ye({
488
+ const L = gt(), { enabledLocations: S, enabledLocationsSwitch: M, promptSelectLocations: I, removeLocation: h } = Ge({
609
489
  getLocations() {
610
490
  return l.locations;
611
491
  },
@@ -668,7 +548,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
668
548
  L.open({
669
549
  title: _("inventory.transfer.form.items.selectItem"),
670
550
  closeButton: !0,
671
- contentComponent: _t,
551
+ contentComponent: bt,
672
552
  contentComponentProps: {
673
553
  modelValue: t,
674
554
  items: o,
@@ -697,7 +577,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
697
577
  maximumQuantity: $,
698
578
  quantityStep: $
699
579
  };
700
- return k.totalCost = He(
580
+ return k.totalCost = Qe(
701
581
  k.sku,
702
582
  k.quantity,
703
583
  k.measurement,
@@ -819,7 +699,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
819
699
  "hide-footer": ""
820
700
  }, {
821
701
  "list-row": D((x) => [
822
- (w(), N(Ge, {
702
+ (w(), N(He, {
823
703
  row: x,
824
704
  key: e(l).purchaseOrder.items.map((Q) => Q.sku._id).join(".")
825
705
  }, {
@@ -850,7 +730,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
850
730
  emits: ["update:show", "submitted"],
851
731
  setup(f, { expose: y, emit: d }) {
852
732
  var o;
853
- const l = f, _ = d, c = at(), n = wt(), { t: a } = X(), F = je(l, "show");
733
+ const l = f, _ = d, c = lt(), n = kt(), { t: a } = X(), F = ze(l, "show");
854
734
  function L() {
855
735
  return {
856
736
  _id: "",
@@ -1047,7 +927,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1047
927
  const d = f, l = y, _ = he(), c = ge(), { t: n } = X(), a = O(() => {
1048
928
  var h;
1049
929
  return (h = d.template) == null ? void 0 : h.purchaseOrder;
1050
- }), { enabledLocations: F } = Ye({
930
+ }), { enabledLocations: F } = Ge({
1051
931
  getLocations() {
1052
932
  var h;
1053
933
  return (h = d.template) == null ? void 0 : h.locations;
@@ -1064,7 +944,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1064
944
  var h, v, g, R;
1065
945
  return ((v = (h = a.value) == null ? void 0 : h.supplier) == null ? void 0 : v.internal) === "restaurant" || ((R = (g = a.value) == null ? void 0 : g.supplier) == null ? void 0 : R.internal) === "warehouse" ? pe.TRANSFER : pe.PURCHASE;
1066
946
  }
1067
- ), M = U(!0), I = je(d, "show");
947
+ ), M = U(!0), I = ze(d, "show");
1068
948
  return (h, v) => {
1069
949
  var r;
1070
950
  const g = C("FmMenuDivider"), R = C("FmCard"), q = C("FmButton"), p = C("FmListItem"), o = C("FmList"), t = C("FmSideSheet");
@@ -1101,7 +981,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1101
981
  ]),
1102
982
  (b = a.value) != null && b.effectiveAt ? (w(), P("div", wo, [
1103
983
  s("div", Fo, T(e(n)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1104
- s("div", To, T(e(xt)(new Date((A = a.value) == null ? void 0 : A.effectiveAt))), 1)
984
+ s("div", To, T(e(_t)(new Date((A = a.value) == null ? void 0 : A.effectiveAt))), 1)
1105
985
  ])) : H("", !0),
1106
986
  s("div", Co, [
1107
987
  s("div", $o, T(e(n)("inventory.transfer.receiveRequest.details.type.title")), 1),
@@ -1137,11 +1017,11 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1137
1017
  s("div", Eo, [
1138
1018
  s("div", No, T(i.name), 1),
1139
1019
  v[2] || (v[2] = s("div", { class: "flex-1 min-w-32" }, null, -1)),
1140
- s("div", zo, T(e(rt)(i.quantity, i.sku.unit, i.measurement)), 1)
1020
+ s("div", zo, T(e(at)(i.quantity, i.sku.unit, i.measurement)), 1)
1141
1021
  ]),
1142
1022
  s("div", jo, [
1143
1023
  s("div", Qo, T(i.code), 1),
1144
- i.totalCost && e(_).enableTotalCost ? (w(), P("div", Ho, " (" + T(e(ht)(i.totalCost)) + ") ", 1)) : H("", !0)
1024
+ i.totalCost && e(_).enableTotalCost ? (w(), P("div", Ho, " (" + T(e(xt)(i.totalCost)) + ") ", 1)) : H("", !0)
1145
1025
  ])
1146
1026
  ]))), 128))
1147
1027
  ])
@@ -1200,7 +1080,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1200
1080
  setup(f) {
1201
1081
  const { t: y } = X(), { createTemplate: d, viewTemplate: l } = Be(), { templateDialogProps: _, transferFormDialogProps: c, templateDetailsProps: n } = Ft(
1202
1082
  Be()
1203
- ), a = it(), F = st(), L = ge(), S = he(), { breakpoints: M } = ze();
1083
+ ), a = rt(), F = ot(), L = ge(), S = he(), { breakpoints: M } = wt();
1204
1084
  L.watchLocation(a.fetchTemplates), _e(() => {
1205
1085
  S.mustManageBusinessOnlyPoTemplate && (L.businessLevel = !0);
1206
1086
  }), fe(
@@ -1211,7 +1091,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1211
1091
  (m) => {
1212
1092
  m === !1 && S.mustManageBusinessOnlyPoTemplate && (L.businessLevel = !0);
1213
1093
  }
1214
- ), Je(() => {
1094
+ ), Ze(() => {
1215
1095
  L.businessLevel = !1;
1216
1096
  });
1217
1097
  const I = O(() => L.businessLevel), h = O(
@@ -1227,7 +1107,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1227
1107
  }
1228
1108
  const o = Ct();
1229
1109
  function t() {
1230
- o.push({ name: gt.RECEIVE_REQUEST });
1110
+ o.push({ name: ht.RECEIVE_REQUEST });
1231
1111
  }
1232
1112
  function r(m) {
1233
1113
  return m;
@@ -1235,7 +1115,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1235
1115
  return (m, i) => {
1236
1116
  const b = C("FmTable");
1237
1117
  return w(), P(ce, null, [
1238
- u(nt, {
1118
+ u(st, {
1239
1119
  title: e(y)("inventory.transfer.template.title2"),
1240
1120
  actions: [
1241
1121
  {
@@ -1260,7 +1140,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1260
1140
  }
1261
1141
  ])
1262
1142
  }, [
1263
- u(lt, {
1143
+ u(nt, {
1264
1144
  searchable: "",
1265
1145
  "change-location": !e(S).mustManageBusinessOnlyPoTemplate,
1266
1146
  search: g.value,
@@ -1269,7 +1149,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1269
1149
  "show-business": ""
1270
1150
  }, null, 8, ["change-location", "search", "actions"]),
1271
1151
  (w(), N(b, {
1272
- style: Xe(e(F).tableHeight),
1152
+ style: Je(e(F).tableHeight),
1273
1153
  "column-defs": e(a).columnDefs,
1274
1154
  "row-data": v.value,
1275
1155
  "search-value": g.value,
@@ -1279,7 +1159,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1279
1159
  "page-size": q.value
1280
1160
  }, {
1281
1161
  "list-row": D(($) => [
1282
- u(Ge, {
1162
+ u(He, {
1283
1163
  row: $,
1284
1164
  onRowClick: (k) => e(l)(k)
1285
1165
  }, {
@@ -1307,7 +1187,7 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1307
1187
  }, null, 8, ["render", "props"])
1308
1188
  ]),
1309
1189
  s("div", null, T((Fe = $.original.locations) != null && Fe.length ? `Enabled for ${(Te = $.original.locations) == null ? void 0 : Te.length} outlets` : "Enabled for all outlets"), 1),
1310
- s("div", es, T($.original.purchaseOrder.items.length ? $.original.purchaseOrder.items.map((We) => We.name).join(", ") : "No items"), 1),
1190
+ s("div", es, T($.original.purchaseOrder.items.length ? $.original.purchaseOrder.items.map((Ye) => Ye.name).join(", ") : "No items"), 1),
1311
1191
  s("div", ts, [
1312
1192
  u(e(E), {
1313
1193
  render: (Se = ($e = (Ce = k.ref) == null ? void 0 : Ce.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Se.cell,
@@ -1334,9 +1214,9 @@ const Ut = { class: "flex flex-col gap-8 py-16" }, Et = { class: "flex items-cen
1334
1214
  }),
1335
1215
  _: 1
1336
1216
  }, 8, ["title", "actions"]),
1337
- (w(), N(et, { to: "body" }, [
1217
+ (w(), N(Xe, { to: "body" }, [
1338
1218
  u(Tt, Pe(e(c), { onSubmitted: t }), null, 16),
1339
- u(Yo, tt(ot(e(n))), null, 16),
1219
+ u(Yo, et(tt(e(n))), null, 16),
1340
1220
  u(fo, Pe(e(_), {
1341
1221
  onSubmitted: i[2] || (i[2] = (A) => e(a).fetchTemplates())
1342
1222
  }), null, 16)
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as K, computed as _, openBlock as v, createElementBlock as w, createElementVNode as l, Fragment as q, renderList as H, toDisplayString as V, createCommentVNode as Y, ref as M, resolveComponent as I, createBlock as T, withCtx as R, createVNode as y, unref as a, isRef as Z, normalizeClass as ae, normalizeStyle as re, Teleport as ie, normalizeProps as ue, guardReactiveProps as de } from "vue";
2
- import { u as G, S as me, c as oe, R as j, A as ce, a as J, l as pe, m as fe, e as ee, j as ve } from "./app-DURkcZal.js";
2
+ import { u as G, S as me, c as oe, R as j, A as ce, a as J, l as pe, m as fe, e as ee, j as ve } from "./app-DYhspC_r.js";
3
3
  import { useDialog as ye, useSnackbar as le, useProxiedModel as te, useBreakpoints as be } from "@feedmepos/ui-library";
4
4
  import { i as ge, _ as xe } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { F as U, D as ne, R as N } from "./row-action.enum-PMKMRrZR.js";
6
6
  import { defineStore as _e, storeToRefs as he } from "pinia";
7
7
  import { c as Ve, _ as Ue, F as we } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
8
8
  import { useI18n as O } from "@feedmepos/mf-common";
9
- import { u as Ce, _ as ke, a as Fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ohHZLOuR.js";
10
- import { F as Se } from "./decimal-BGJlFDm8.js";
11
- import { _ as $e } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CJYmB7Ct.js";
9
+ import { u as Ce, _ as ke, a as Fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BRV9dZhu.js";
10
+ import { F as Se } from "./decimal-DwEh3AcZ.js";
11
+ import { _ as $e } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cxy6vo9D.js";
12
12
  const Ee = { class: "flex flex-col gap-8" }, Ie = {
13
13
  key: 0,
14
14
  class: "flex flex-col"
@@ -1,11 +1,11 @@
1
1
  import { ref as W, defineComponent as j, watch as ee, onMounted as te, onUnmounted as Fe, openBlock as S, createElementBlock as z, toRaw as be, reactive as xe, createElementVNode as g, toDisplayString as U, unref as c, createVNode as V, resolveComponent as L, createSlots as $e, withCtx as N, createTextVNode as We, renderSlot as De, createBlock as I, createCommentVNode as Ae, computed as F, isRef as we, normalizeClass as Se, normalizeStyle as Re } from "vue";
2
- import { n as Pe, Q as Te, T as Ue, c as G, V as ae, W as le, X as Ee, i as Le, R as E, j as Ne } from "./app-DURkcZal.js";
2
+ import { n as Pe, T as Te, V as Ue, c as G, W as ae, X as le, Y as Ee, i as Le, R as E, j as Ne } from "./app-DYhspC_r.js";
3
3
  import { useCoreStore as Be, useI18n as q } from "@feedmepos/mf-common";
4
4
  import { D as Ve, R as Z, F as T } from "./row-action.enum-PMKMRrZR.js";
5
5
  import { c as qe, _ as ze, F as J } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { u as Ie, _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ohHZLOuR.js";
6
+ import { u as Ie, _ as je, a as Oe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BRV9dZhu.js";
7
7
  import { useDialogChild as Ge, useDialog as Me, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ke } from "@feedmepos/ui-library";
8
- const Y = Pe((m, h) => {
8
+ const Q = Pe((m, h) => {
9
9
  const y = Be();
10
10
  return {
11
11
  async readWarehouses() {
@@ -47,17 +47,17 @@ function Ce() {
47
47
  },
48
48
  // actions
49
49
  async readWarehouses() {
50
- const m = Y();
50
+ const m = Q();
51
51
  this.warehouses = await m.readWarehouses();
52
52
  },
53
53
  async createWarehouse(m) {
54
- await Y().createWarehouse(m);
54
+ await Q().createWarehouse(m);
55
55
  },
56
56
  async updateWarehouse(m) {
57
- await Y().updateWarehouse(m._id, m.profile);
57
+ await Q().updateWarehouse(m._id, m.profile);
58
58
  },
59
59
  async deleteWarehouse(m) {
60
- await Y().deleteWarehouse(m._id);
60
+ await Q().deleteWarehouse(m._id);
61
61
  },
62
62
  async init() {
63
63
  const m = Te();
@@ -69,7 +69,7 @@ function Ce() {
69
69
  }
70
70
  };
71
71
  }
72
- function Qe(m, h) {
72
+ function Xe(m, h) {
73
73
  function y(p, r) {
74
74
  if (p === Z.Edit) {
75
75
  m(G(r));
@@ -141,7 +141,7 @@ function Qe(m, h) {
141
141
  }
142
142
  return { columnDefs: n, formatRowData: l };
143
143
  }
144
- const Xe = /* @__PURE__ */ j({
144
+ const Ye = /* @__PURE__ */ j({
145
145
  __name: "GoogleMap",
146
146
  props: {
147
147
  markers: {
@@ -267,7 +267,7 @@ const Xe = /* @__PURE__ */ j({
267
267
  class: "map app-map"
268
268
  }, null, 512));
269
269
  }
270
- }), Ze = { class: "flex flex-col gap-24" }, Je = { class: "flex flex-col gap-8" }, Ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, eo = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = /* @__PURE__ */ j({
270
+ }), Ze = { class: "flex flex-col gap-24" }, Je = { class: "flex flex-col gap-8" }, Qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, eo = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lo = { class: "fm-typo-en-body-lg-600" }, so = /* @__PURE__ */ j({
271
271
  __name: "CoordinateDialog",
272
272
  props: {
273
273
  address: {
@@ -298,7 +298,7 @@ const Xe = /* @__PURE__ */ j({
298
298
  return (v, M) => (S(), z("div", Ze, [
299
299
  g("div", Je, [
300
300
  g("div", null, [
301
- g("span", Ye, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
301
+ g("span", Qe, U(c(n)("inventory.formField.coordinate.address")) + ": ", 1),
302
302
  g("span", eo, U(p.value), 1)
303
303
  ]),
304
304
  g("div", null, [
@@ -310,7 +310,7 @@ const Xe = /* @__PURE__ */ j({
310
310
  g("span", lo, U(l.lat), 1)
311
311
  ])
312
312
  ]),
313
- V(Xe, {
313
+ V(Ye, {
314
314
  ref_key: "gmapRef",
315
315
  ref: _,
316
316
  class: "h-[272px] sm:h-[240px] xs:h-[240px]",
@@ -895,7 +895,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
895
895
  n.close();
896
896
  }
897
897
  }
898
- const { columnDefs: C, formatRowData: R } = Qe(
898
+ const { columnDefs: C, formatRowData: R } = Xe(
899
899
  v,
900
900
  M
901
901
  );
@@ -963,7 +963,7 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
963
963
  onRowClick: (s) => v(s.original)
964
964
  }, {
965
965
  default: N((s) => {
966
- var f, b, x, D, K, re, ne, ue, H, ie, de, ce, pe, me, Q, fe, he, ye, ve, X, ge;
966
+ var f, b, x, D, K, re, ne, ue, H, ie, de, ce, pe, me, X, fe, he, ye, ve, Y, ge;
967
967
  return [
968
968
  g("div", Co, [
969
969
  g("div", Fo, [
@@ -981,13 +981,13 @@ const uo = { class: "flex gap-8 items-center" }, io = { key: 0 }, co = { key: 1
981
981
  (de = P.original) != null && de.email ? (S(), z("div", $o, [
982
982
  V(c(J), {
983
983
  render: (me = (pe = (ce = s.email) == null ? void 0 : ce.column) == null ? void 0 : pe.columnDef) == null ? void 0 : me.cell,
984
- props: (fe = (Q = s.email) == null ? void 0 : Q.getContext) == null ? void 0 : fe.call(Q)
984
+ props: (fe = (X = s.email) == null ? void 0 : X.getContext) == null ? void 0 : fe.call(X)
985
985
  }, null, 8, ["render", "props"])
986
986
  ])) : Ae("", !0),
987
987
  g("div", Wo, [
988
988
  V(c(J), {
989
989
  render: (ve = (ye = (he = s.address) == null ? void 0 : he.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
990
- props: (ge = (X = s.address) == null ? void 0 : X.getContext) == null ? void 0 : ge.call(X)
990
+ props: (ge = (Y = s.address) == null ? void 0 : Y.getContext) == null ? void 0 : ge.call(Y)
991
991
  }, null, 8, ["render", "props"])
992
992
  ])
993
993
  ])
@@ -1,4 +1,18 @@
1
+ export interface RecentPublish {
2
+ recentJob?: PublishingJob | null;
3
+ publishedRevs?: FdoClosingTemplatePublish['publishedRev'] | null;
4
+ }
5
+ export interface PublishingJob {
6
+ id: string;
7
+ businessId: string;
8
+ outlets: string[];
9
+ completed: string[];
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ }
1
13
  export declare const useClosingTemplateApi: () => {
14
+ getRecentPublishingJob(): Promise<RecentPublish>;
15
+ startNewPublish(): Promise<PublishingJob>;
2
16
  getTemplate(id: string): Promise<FdoClosingTemplate>;
3
17
  readTemplates(): Promise<FdoClosingTemplate[]>;
4
18
  createTemplate(template: Omit<FdoClosingTemplate, '_id'>): Promise<FdoClosingTemplate>;