@feedmepos/mf-inventory-portal 0.0.5 → 0.0.7-dev.1

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 (74) hide show
  1. package/dist/{ApprovalView-CTQdDgGH.js → ApprovalView-BYZcvkso.js} +6 -6
  2. package/dist/BindingsDialog-pdS86VDU.js +94 -0
  3. package/dist/{BindingsPicker-CQIGhTCR.js → BindingsPicker-D891Cfzu.js} +2 -2
  4. package/dist/{BindingsTable-Da4BLkvc.js → BindingsTable-tmr6QwLk.js} +30 -31
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bss0q2Zt.js} +7 -7
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BHcLUkdm.js} +19 -20
  7. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIww2Noe.js} +1 -1
  8. package/dist/IngredientsView-BH6G7830.js +819 -0
  9. package/dist/{IntegrationView-BRWYO3VE.js → IntegrationView-CfJn6Fzn.js} +3 -3
  10. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-39U8Iavr.js +258 -0
  11. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBK7mpQS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nDxqau1g.js} +1 -1
  12. package/dist/{PurchaseOrderPrintPreview-CH9gVYDg.js → PurchaseOrderPrintPreview-Db2U_IQL.js} +1 -1
  13. package/dist/ReceiveRequestView-CgVfcS8C.js +1483 -0
  14. package/dist/{RecipeView-DFG9Wkx-.js → RecipeView-C9_Y_A9b.js} +58 -58
  15. package/dist/StockView-CoUI3Faj.js +1916 -0
  16. package/dist/SupplierView-CNq6wVfN.js +818 -0
  17. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cmajrg-9.js} +5 -5
  18. package/dist/{UnitView-C3XVSbJY.js → UnitView-Buyp4Gnc.js} +190 -177
  19. package/dist/{WarehouseView-BntzAdz3.js → WarehouseView-DbUib0PR.js} +56 -56
  20. package/dist/api/inventory.d.ts +33 -0
  21. package/dist/api/stock-estimate.d.ts +16 -0
  22. package/dist/api/stock.d.ts +8 -0
  23. package/dist/app-DM4Thqjw.js +42756 -0
  24. package/dist/app.js +1 -1
  25. package/dist/components/StockForecast.vue.d.ts +12 -0
  26. package/dist/components/StockForecastProps.d.ts +3 -0
  27. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +16 -0
  28. package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -0
  29. package/dist/core.d.ts +3 -2
  30. package/dist/date2-DpU4LDaP.js +199 -0
  31. package/dist/dayjs.min-D4Q_pHH9.js +13556 -0
  32. package/dist/{decimal-D3a0BwVj.js → decimal-M4vjE6Br.js} +1 -1
  33. package/dist/{fuzzy-BW8ZYsDG.js → fuzzy-fD_FTJWH.js} +1 -1
  34. package/dist/helper/number.d.ts +1 -0
  35. package/dist/{init-date-range-M3Q03-Fd.js → init-date-range-DJ1Nl5TB.js} +1 -1
  36. package/dist/{layout-BvUjg6JS.js → layout-kY567oHX.js} +1 -1
  37. package/dist/{rules-DHfAMDW3.js → rules-CVxh5XVG.js} +3 -3
  38. package/dist/stock-estimate-lkaYlz7I.js +90 -0
  39. package/dist/stores/api.d.ts +1 -0
  40. package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
  41. package/dist/stores/inventory.d.ts +64 -0
  42. package/dist/stores/stock-estimate.d.ts +11 -0
  43. package/dist/stores/supplier.d.ts +19 -1
  44. package/dist/style.css +1 -1
  45. package/dist/{supplier-DTiiOLtg.js → supplier-evd71Y1H.js} +3 -3
  46. package/dist/tsconfig.app.tsbuildinfo +1 -1
  47. package/dist/{use-inventory-binding-dialog-B6JO7050.js → use-inventory-binding-dialog-CGuXojFC.js} +2 -2
  48. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -0
  49. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +16 -0
  50. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +23 -0
  51. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +213 -7
  52. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -2
  53. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +306 -6
  54. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +9 -0
  55. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +32 -0
  56. package/dist/views/stock/type.d.ts +1 -0
  57. package/dist/views/supplier/components/SupplierForm.vue.d.ts +38 -2
  58. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +45 -0
  59. package/dist/views/supplier/composables/use-supplier-table.d.ts +19 -1
  60. package/dist/{xlsx-BljO4Lx2.js → xlsx-DpBw8KA4.js} +1010 -1010
  61. package/package.json +13 -7
  62. package/dist/BindingsDialog-DvX_DRsO.js +0 -82
  63. package/dist/IngredientsView-2ZKdzsgI.js +0 -739
  64. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js +0 -240
  65. package/dist/ReceiveRequestView-DQBqc3GF.js +0 -1298
  66. package/dist/StockView-DLWMp_I5.js +0 -1733
  67. package/dist/SupplierView-CZhM2ie3.js +0 -607
  68. package/dist/app-BzDhmCVx.js +0 -36639
  69. package/dist/components/shell/inventory/binding-ui.test.d.ts +0 -1
  70. package/dist/components/ui-library/FmSpecialChip.vue.d.ts +0 -79
  71. package/dist/date2-C7HiAWQG.js +0 -209
  72. package/dist/dayjs.min-Db57WhI9.js +0 -282
  73. package/dist/id-to-date-ReZIpUDw.js +0 -30
  74. package/dist/index-D46it8Rk.js +0 -12956
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as E, mergeModels as ae, useModel as de, onMounted as ue, ref as D, computed as L, resolveComponent as B, openBlock as F, createElementBlock as S, createElementVNode as c, toDisplayString as Z, createVNode as M, createBlock as j, withCtx as I, Fragment as z, renderList as G, normalizeClass as R, normalizeStyle as ce, createSlots as fe, unref as P, createCommentVNode as O, withModifiers as me, reactive as Q, watch as X, isRef as ee, Teleport as pe } from "vue";
2
2
  import { E as ge } from "./empty-placeholder-wf6-BWE8.js";
3
- import { v as ve, c as U, w as be, b as ye } from "./app-BzDhmCVx.js";
3
+ import { v as ve, c as U, w as be, e as ye } from "./app-DM4Thqjw.js";
4
4
  import { useDialogChild as he, useDialog as te, useProxiedModel as ne, useSnackbar as _e } from "@feedmepos/ui-library";
5
- import { f as oe } from "./fuzzy-BW8ZYsDG.js";
5
+ import { f as oe } from "./fuzzy-fD_FTJWH.js";
6
6
  import { _ as Ce } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
7
- import { _ as xe } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js";
7
+ import { _ as xe } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bss0q2Zt.js";
8
8
  import { useCoreStore as we } from "@feedmepos/mf-common";
9
9
  const He = "data:image/svg+xml,%3csvg%20width='200'%20height='101'%20viewBox='0%200%20200%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M98.9161%2038.4456V24.1772H108.527V27.1988H102.12V30.2202H107.347V32.7382H102.12V38.4456H98.9161Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.382%2031.2276C110.382%2027.5345%20113.249%2024.1772%20117.127%2024.1772C121.174%2024.1772%20123.872%2027.7024%20123.872%2031.3953C123.872%2035.0884%20121.005%2038.6133%20117.127%2038.6133C113.08%2038.4456%20110.382%2034.9204%20110.382%2031.2276ZM117.127%2035.5919C119.487%2035.5919%20120.499%2033.4096%20120.499%2031.2276C120.499%2029.0452%20119.319%2027.0309%20117.127%2027.0309C114.935%2027.0309%20113.754%2029.213%20113.754%2031.2276C113.754%2033.5776%20114.935%2035.5919%20117.127%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M126.232%2031.2276C126.232%2027.5345%20129.099%2024.1772%20132.977%2024.1772C137.024%2024.1772%20139.722%2027.7024%20139.722%2031.3953C139.722%2035.0884%20136.855%2038.6133%20132.977%2038.6133C128.93%2038.4456%20126.232%2034.9204%20126.232%2031.2276ZM132.977%2035.5919C135.337%2035.5919%20136.349%2033.4096%20136.349%2031.2276C136.349%2029.0452%20135.169%2027.0309%20132.977%2027.0309C130.785%2027.0309%20129.604%2029.213%20129.604%2031.2276C129.604%2033.5776%20130.785%2035.5919%20132.977%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M142.926%2038.4455V24.345H148.153C152.874%2024.345%20155.235%2027.5343%20155.235%2031.3952C155.235%2035.5918%20152.368%2038.4455%20148.153%2038.4455H142.926ZM148.153%2027.0308H146.129V35.4238H148.153C150.513%2035.4238%20151.862%2033.5775%20151.862%2031.2272C151.862%2028.8773%20150.513%2027.0308%20148.153%2027.0308Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.045%2057.5607V49.1676L107.009%2055.2107H105.324L102.12%2049.1676V57.5607H98.9161V43.4604H102.457L106.167%2050.8465L109.876%2043.4604H113.417V57.5607H110.045Z'%20fill='%235D5359'/%3e%3cpath%20d='M115.947%2057.5607L121.342%2043.4604H124.04L129.436%2057.5607H125.895L124.715%2054.3716H120.331L119.319%2057.5607H115.947ZM122.691%2046.9856L121.005%2052.1893H124.378L122.691%2046.9856Z'%20fill='%235D5359'/%3e%3cpath%20d='M131.965%2057.5607V43.4604H138.373C141.07%2043.4604%20142.925%2045.8105%20142.925%2048.1605C142.925%2049.8393%20142.082%2051.5179%20140.565%2052.1893L143.768%2057.393H140.059L137.192%2052.8607H135V57.393H131.965V57.5607ZM135.169%2050.175H138.204C139.047%2050.175%20139.553%2049.3356%20139.553%2048.1605C139.553%2046.9856%20138.71%2046.3142%20138.035%2046.3142H135.169V50.175Z'%20fill='%235D5359'/%3e%3cpath%20d='M146.635%2057.5607V43.4604H150.007V49.8393L155.403%2043.4604H158.776L153.548%2049.6713L159.281%2057.5607H155.74L151.693%2051.5179L150.007%2053.3642V57.5607H146.635Z'%20fill='%235D5359'/%3e%3cpath%20d='M171.422%2054.7073V57.5607H161.474V43.4604H171.253V46.3142H164.677V48.9999H170.242V51.6856H164.677V54.7073H171.422Z'%20fill='%235D5359'/%3e%3cpath%20d='M185.417%2046.3142H181.202V57.5607H177.829V46.3142H173.614V43.4604H185.417V46.3142Z'%20fill='%235D5359'/%3e%3cpath%20d='M111.057%2062.5967V76.6973H107.853V70.9898H102.12V76.6973H98.9161V62.5967H102.12V68.1361H107.853V62.5967H111.057Z'%20fill='%235D5359'/%3e%3cpath%20d='M124.04%2069.815V62.5967H127.244V69.815C127.244%2073.6758%20125.389%2076.865%20121.005%2076.865C116.453%2076.865%20114.766%2073.5078%20114.766%2069.815V62.5967H117.97V69.815C117.97%2071.997%20118.813%2074.0115%20121.005%2074.0115C123.366%2074.0115%20124.04%2071.997%20124.04%2069.815Z'%20fill='%235D5359'/%3e%3cpath%20d='M138.036%2076.6973H131.122V62.5967H139.047C141.071%2062.5967%20142.251%2064.4433%20142.251%2066.2898C142.251%2067.6327%20141.576%2068.9755%20140.228%2069.4793C141.914%2069.9827%20142.926%2071.1578%20142.926%2073.1721C142.757%2075.5221%20140.733%2076.6973%20138.036%2076.6973ZM134.326%2065.4504V68.3041H137.53C138.204%2068.3041%20138.879%2067.8004%20138.879%2066.7933C138.879%2065.7861%20138.373%2065.2827%20137.698%2065.2827H134.326V65.4504ZM138.204%2070.8221H134.494V73.8435H138.204C139.047%2073.8435%20139.722%2073.1721%20139.722%2072.3327C139.553%2071.6613%20138.879%2070.8221%20138.204%2070.8221Z'%20fill='%235D5359'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M73.4753%2051.4994C78.7281%2050.5396%2082.8911%2046.4891%2083.9954%2041.3137L84.1232%2040.7134L83.9445%2040.1256C80.5804%2029.066%2071.9945%2020.2704%2061.0373%2016.5726C57.4%2015.3451%2053.5046%2014.6804%2049.458%2014.6804C45.4112%2014.6804%2041.5158%2015.3451%2037.8784%2016.5726C26.9214%2020.2704%2018.3354%2029.066%2014.9712%2040.1256L14.7924%2040.7134L14.9206%2041.3137C16.0247%2046.4891%2020.1875%2050.5396%2025.4405%2051.4994V58.8839H14.4183C14.6758%2059.9557%2014.9818%2061.0088%2015.3337%2062.0411C20.1553%2076.1811%2033.6083%2086.3619%2049.458%2086.3619C65.3074%2086.3619%2078.7606%2076.1811%2083.5822%2062.0411C83.9342%2061.0088%2084.2399%2059.9557%2084.4974%2058.8839H73.4753V51.4994ZM41.0517%2020.5973V38.5742C41.0517%2043.1931%2044.8155%2046.9371%2049.458%2046.9371C54.1005%2046.9371%2057.8641%2043.1931%2057.8641%2038.5742V20.5973C55.1919%2019.856%2052.3732%2019.4592%2049.458%2019.4592C46.5428%2019.4592%2043.7241%2019.856%2041.0517%2020.5973ZM62.6675%2022.3673V38.5742C62.6675%2043.1931%2066.431%2046.9371%2071.0735%2046.9371C74.9051%2046.9371%2078.1425%2044.3848%2079.1528%2040.8942C76.4672%2032.6902%2070.4379%2025.9824%2062.6675%2022.3673ZM60.2658%2046.1322C57.8753%2049.5094%2053.9255%2051.7159%2049.458%2051.7159C44.9902%2051.7159%2041.0408%2049.5094%2038.65%2046.1322C36.6982%2048.8894%2033.7074%2050.8662%2030.2439%2051.4994V58.8839H68.6718V51.4994C65.2083%2050.8662%2062.2175%2048.8894%2060.2658%2046.1322ZM21.1583%2063.6628C26.1349%2074.2514%2036.9382%2081.5834%2049.458%2081.5834C61.9776%2081.5834%2072.781%2074.2514%2077.7574%2063.6628H21.1583ZM36.2482%2038.5742V22.3673C28.4779%2025.9824%2022.4486%2032.6902%2019.7631%2040.8942C20.7733%2044.3848%2024.0106%2046.9371%2027.8422%2046.9371C32.4847%2046.9371%2036.2482%2043.1931%2036.2482%2038.5742Z'%20fill='%23FFC35D'/%3e%3c/svg%3e";
10
10
  function Y(_, v) {
@@ -0,0 +1,258 @@
1
+ import { defineComponent as Q, computed as x, resolveComponent as y, openBlock as p, createElementBlock as B, createVNode as a, unref as r, createElementVNode as n, Fragment as R, renderList as M, createBlock as F, withCtx as V, createTextVNode as E, toDisplayString as P, createCommentVNode as T, createStaticVNode as W } from "vue";
2
+ import { u as X } from "./app-DM4Thqjw.js";
3
+ import { u as Y, g as Z } from "./use-inventory-binding-dialog-CGuXojFC.js";
4
+ import { a as I, c as ee } from "./date2-DpU4LDaP.js";
5
+ import { A as oe, b as ne, a as L, M as te } from "./rules-CVxh5XVG.js";
6
+ import { g as le } from "./dayjs.min-D4Q_pHH9.js";
7
+ const ie = { class: "flex flex-col gap-24" }, de = { class: "flex flex-col gap-16" }, se = { class: "flex items-center" }, ae = /* @__PURE__ */ n("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Recipe", -1), re = { class: "flex flex-col" }, ue = /* @__PURE__ */ n("div", { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, [
8
+ /* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, "Recipe"),
9
+ /* @__PURE__ */ n("div", { class: "w-[200px]" }),
10
+ /* @__PURE__ */ n("div", { class: "w-[52px]" })
11
+ ], -1), me = { class: "flex h-48 items-center w-full border-b border-fm-color-neutral-gray-100" }, ce = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, pe = { class: "w-[200px]" }, fe = { class: "w-[52px]" }, ve = { class: "flex flex-col gap-16" }, ye = { class: "flex items-center" }, be = /* @__PURE__ */ n("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Ingredient", -1), _e = { class: "flex flex-col" }, xe = /* @__PURE__ */ W('<div class="flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center"><div class="flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary">Ingredient</div><div class="fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[110px] px-16"> Amount </div><div class="fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[160px] px-16"> Unit </div><div class="w-[52px]"></div></div>', 1), Ve = { class: "flex h-48 items-center w-full border-b border-fm-color-neutral-gray-100" }, he = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ge = { class: "w-[110px] px-4" }, ke = { class: "w-[160px]" }, we = { class: "w-[52px]" }, Fe = /* @__PURE__ */ n("div", null, null, -1), Re = /* @__PURE__ */ Q({
12
+ __name: "InventoryBindingForm",
13
+ props: {
14
+ id: {},
15
+ modelValue: { default: () => [] },
16
+ excludeBindingId: {},
17
+ iframeMode: { type: Boolean },
18
+ disabled: { type: Boolean }
19
+ },
20
+ emits: ["update:modelValue", "click:pick-inventory-bindings"],
21
+ setup(z, { emit: N }) {
22
+ const h = X(), j = x(() => h.inventory.recipe ?? []), g = x(() => h.inventory.sku ?? []), u = z, m = N, k = x(
23
+ () => le({
24
+ id: u.id ?? "",
25
+ skus: h.skus,
26
+ recipes: h.recipes
27
+ })
28
+ ), D = x(() => u.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: G, promptRecipesBinding: K } = Y();
29
+ async function O() {
30
+ if (u.iframeMode) {
31
+ m("click:pick-inventory-bindings", "RECIPE");
32
+ return;
33
+ }
34
+ K(
35
+ u.modelValue,
36
+ (e) => m("update:modelValue", e),
37
+ k.value.recipes
38
+ );
39
+ }
40
+ const $ = x(() => u.modelValue.filter((e) => e.type === "SKU") ?? []);
41
+ async function q() {
42
+ if (u.iframeMode) {
43
+ m("click:pick-inventory-bindings", "SKU");
44
+ return;
45
+ }
46
+ G(
47
+ u.modelValue,
48
+ (e) => m("update:modelValue", e),
49
+ u.excludeBindingId,
50
+ k.value.skus
51
+ );
52
+ }
53
+ function U(e, s, i) {
54
+ const d = +s;
55
+ let t = i;
56
+ s.length > 0 && isFinite(d) ? t = i.map((l) => (l.id !== e || (l.amount = ee(d)), l)) : t = i.map((l) => (l.id !== e || (l.amount = { amount: 0, precision: 0 }), l)), m("update:modelValue", t);
57
+ }
58
+ function C(e) {
59
+ const s = g.value.find((i) => i._id === e);
60
+ return s ? Z(s.unit, !0) : [];
61
+ }
62
+ function H(e, s) {
63
+ const i = C(e), d = i.find((t) => t.value === s) ?? i.find((t) => t.value === null);
64
+ return d ? {
65
+ ...d,
66
+ label: d.abbrev
67
+ } : null;
68
+ }
69
+ function J(e, s, i) {
70
+ let d;
71
+ if (s === null)
72
+ d = i.map((t) => (t.id !== e || (t.measurement = null), t)) ?? [];
73
+ else {
74
+ const t = g.value.find((l) => l._id === e);
75
+ d = i.map((l) => {
76
+ var b, w;
77
+ return l.id !== e || (l.measurement = (w = (b = t == null ? void 0 : t.unit) == null ? void 0 : b.measurements) == null ? void 0 : w.find((o) => o.id === s)), l;
78
+ }) ?? [];
79
+ }
80
+ m("update:modelValue", d);
81
+ }
82
+ function S(e, s) {
83
+ const i = s.filter((d) => d.id !== e);
84
+ m("update:modelValue", i);
85
+ }
86
+ return (e, s) => {
87
+ const i = y("FmFormGroup"), d = y("FmButton"), t = y("FmIcon"), l = y("FmTooltip"), b = y("FmTextField"), w = y("FmSelect");
88
+ return p(), B("div", ie, [
89
+ a(i, {
90
+ disabled: e.disabled,
91
+ "model-value": e.modelValue,
92
+ rules: e.iframeMode ? void 0 : [r(oe)(1, "Must have at least one inventory binding")]
93
+ }, null, 8, ["disabled", "model-value", "rules"]),
94
+ n("div", de, [
95
+ n("div", se, [
96
+ ae,
97
+ a(d, {
98
+ variant: "secondary",
99
+ "text-color": "primary",
100
+ "border-color": "primary",
101
+ label: "Link recipe",
102
+ "prepend-icon": "link",
103
+ onClick: O
104
+ })
105
+ ]),
106
+ n("div", re, [
107
+ ue,
108
+ (p(!0), B(R, null, M(D.value, (o) => (p(), F(i, {
109
+ key: o.id,
110
+ disabled: e.disabled,
111
+ modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
112
+ rules: [r(ne)(0), r(L)(0)]
113
+ }, {
114
+ default: V(({ invalid: f }) => {
115
+ var _;
116
+ return [
117
+ n("div", me, [
118
+ n("div", ce, [
119
+ E(P((_ = j.value.find((c) => c._id === o.id)) == null ? void 0 : _.name) + " ", 1),
120
+ k.value.recipes.includes(o.id) ? (p(), F(l, {
121
+ key: 0,
122
+ variant: "plain",
123
+ placement: "bottom",
124
+ content: "It is invalid, please verify or remove it.",
125
+ "hide-arrow": !0,
126
+ "z-index": 50
127
+ }, {
128
+ default: V(() => [
129
+ a(t, {
130
+ name: "error",
131
+ size: "sm",
132
+ color: "#ff3b30"
133
+ })
134
+ ]),
135
+ _: 1
136
+ })) : T("", !0)
137
+ ]),
138
+ n("div", pe, [
139
+ a(b, {
140
+ class: "w-full",
141
+ disabled: e.disabled,
142
+ modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
143
+ "onUpdate:modelValue": (c) => U(o.id, c, e.modelValue),
144
+ invalid: f
145
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
146
+ ]),
147
+ n("div", fe, [
148
+ a(d, {
149
+ disabled: e.disabled,
150
+ type: "button",
151
+ variant: "plain",
152
+ icon: "delete",
153
+ "icon-color": "#000000",
154
+ onClick: (c) => S(o.id, e.modelValue)
155
+ }, null, 8, ["disabled", "onClick"])
156
+ ])
157
+ ])
158
+ ];
159
+ }),
160
+ _: 2
161
+ }, 1032, ["disabled", "modelValue", "rules"]))), 128))
162
+ ])
163
+ ]),
164
+ n("div", ve, [
165
+ n("div", ye, [
166
+ be,
167
+ a(d, {
168
+ variant: "secondary",
169
+ "text-color": "primary",
170
+ "border-color": "primary",
171
+ label: "Link ingredient",
172
+ "prepend-icon": "link",
173
+ onClick: q
174
+ })
175
+ ]),
176
+ n("div", _e, [
177
+ xe,
178
+ (p(!0), B(R, null, M($.value, (o) => (p(), F(i, {
179
+ key: o.id,
180
+ disabled: e.disabled,
181
+ modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
182
+ rules: [
183
+ r(te)(
184
+ g.value.find((f) => f._id === o.id).unit,
185
+ o.measurement
186
+ ),
187
+ r(L)(0)
188
+ ]
189
+ }, {
190
+ default: V(({ invalid: f }) => {
191
+ var _, c, A;
192
+ return [
193
+ n("div", Ve, [
194
+ n("div", he, [
195
+ E(P((_ = g.value.find((v) => v._id === o.id)) == null ? void 0 : _.name) + " ", 1),
196
+ k.value.skus.includes(o.id) ? (p(), F(l, {
197
+ key: 0,
198
+ variant: "plain",
199
+ placement: "bottom",
200
+ content: "It is invalid, please verify or remove it.",
201
+ "hide-arrow": !0,
202
+ "z-index": 50
203
+ }, {
204
+ default: V(() => [
205
+ a(t, {
206
+ name: "error",
207
+ size: "sm",
208
+ color: "#ff3b30"
209
+ })
210
+ ]),
211
+ _: 1
212
+ })) : T("", !0)
213
+ ]),
214
+ n("div", ge, [
215
+ a(b, {
216
+ disabled: e.disabled,
217
+ modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
218
+ "onUpdate:modelValue": (v) => U(o.id, v, e.modelValue),
219
+ invalid: f
220
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
221
+ ]),
222
+ n("div", ke, [
223
+ a(w, {
224
+ disabled: e.disabled,
225
+ class: "translate-y-[4px]",
226
+ items: C(o.id),
227
+ "model-value": (A = H(o.id, (c = o.measurement) == null ? void 0 : c.id)) == null ? void 0 : A.value,
228
+ "onUpdate:modelValue": (v) => J(o.id, v, e.modelValue),
229
+ invalid: f
230
+ }, {
231
+ "helper-text": V(() => []),
232
+ _: 2
233
+ }, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"])
234
+ ]),
235
+ n("div", we, [
236
+ a(d, {
237
+ disabled: e.disabled,
238
+ type: "button",
239
+ variant: "tertiary",
240
+ icon: "delete",
241
+ onClick: (v) => S(o.id, e.modelValue)
242
+ }, null, 8, ["disabled", "onClick"])
243
+ ])
244
+ ])
245
+ ];
246
+ }),
247
+ _: 2
248
+ }, 1032, ["disabled", "modelValue", "rules"]))), 128))
249
+ ]),
250
+ Fe
251
+ ])
252
+ ]);
253
+ };
254
+ }
255
+ });
256
+ export {
257
+ Re as _
258
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
2
- import { t as d } from "./date2-C7HiAWQG.js";
2
+ import { c as d } from "./date2-DpU4LDaP.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as x, computed as f, ref as m, onMounted as g, openBlock as r, createElementBlock as o, createElementVNode as e, toDisplayString as t, normalizeStyle as w, createTextVNode as i, Fragment as u, createCommentVNode as h, renderList as _, normalizeClass as k, pushScopeId as S, popScopeId as C } from "vue";
2
2
  import { useRoute as P } from "vue-router";
3
- import { n as v, _ as R } from "./app-BzDhmCVx.js";
3
+ import { n as v, _ as R } from "./app-DM4Thqjw.js";
4
4
  const n = (d) => (S("data-v-54384fc1"), d = d(), C(), d), A = { class: "purchase-box" }, N = { valign: "bottom" }, E = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "title" }, "Inventory Receive Note", -1)), O = { class: "text-right" }, D = { class: "header" }, q = /* @__PURE__ */ n(() => /* @__PURE__ */ e("hr", null, null, -1)), I = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Supplier", -1)), T = { class: "sub-header" }, F = { class: "caption" }, L = { class: "address" }, U = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), V = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), z = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), B = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), H = { class: "text-right" }, M = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "header" }, "Delivery To", -1)), J = { class: "sub-header" }, Q = { class: "address" }, j = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), G = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), K = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), W = /* @__PURE__ */ n(() => /* @__PURE__ */ e("br", null, null, -1)), X = { class: "purchase-body" }, Y = /* @__PURE__ */ n(() => /* @__PURE__ */ e("thead", { class: "item-header" }, [
5
5
  /* @__PURE__ */ e("tr", null, [
6
6
  /* @__PURE__ */ e("th", {