@feedmepos/mf-inventory-portal 1.2.51 → 1.2.53-dev.2

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 (104) hide show
  1. package/dist/{App-BJ_vKOR1.js → App-C8X881gs.js} +75 -70
  2. package/dist/{ApprovalView-B_prTTtl.js → ApprovalView-CnwwVO46.js} +34 -34
  3. package/dist/{BindingsDialog-BPuKgJIk.js → BindingsDialog-MM6wv-je.js} +2 -2
  4. package/dist/{BindingsPicker-Dv_cmEil.js → BindingsPicker-C_VV8t8e.js} +2 -2
  5. package/dist/{BindingsTable-BNSfYRfq.js → BindingsTable-CabKT98b.js} +4 -4
  6. package/dist/{ClosingDraftView-C78tcaJ3.js → ClosingDraftView-D3dwGHdG.js} +19 -18
  7. package/dist/{ClosingHistoryView-DY8liEk3.js → ClosingHistoryView-CBMIWL-O.js} +27 -27
  8. package/dist/{ClosingTemplateView-pJXEcrjO.js → ClosingTemplateView-FHCJY1Y1.js} +525 -511
  9. package/dist/{DeliveryOrderPrintPreview-Bu_l-kxu.js → DeliveryOrderPrintPreview-BB4HVWaM.js} +1 -1
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dq2vcIMB.js +188 -0
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DHe5G3kX.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSrjl8Vc.js} +12 -12
  12. package/dist/FmMultiselectDialog-D8E2bGwL.js +618 -0
  13. package/dist/{FmMultiselectDialog-C3iCMK5I.js → FmMultiselectDialog-HP5xQpLC.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CefvebOx.js → FmUnitInput.vue_vue_type_script_setup_true_lang--yzPFTUH.js} +3 -3
  15. package/dist/{ImportView-JrenRgiI.js → ImportView-DQPKyc1T.js} +7 -7
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CSdxodp6.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DZAOa26T.js} +1 -1
  17. package/dist/{IngredientGroupView-aDFq_ZDh.js → IngredientGroupView-CiR31jQz.js} +108 -107
  18. package/dist/{IngredientsView-DSh3UqDg.js → IngredientsView-Csa1Lifk.js} +126 -125
  19. package/dist/{IntegrationView-KhZ78uxM.js → IntegrationView-DqGXjNPx.js} +80 -80
  20. package/dist/{InventoryBindingForm-DZu0CZYh.js → InventoryBindingForm-kZ6JIgK4.js} +1 -1
  21. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-D-qjPLHS.js +403 -0
  22. package/dist/{InventoryBindingSummary-DZxLhZ_-.js → InventoryBindingSummary-Cn3y7cXX.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DAwpZY3n.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-5cpvf_ze.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CPDxwz-V.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DW_3XEAx.js} +2 -2
  25. package/dist/{PublishView-CLnQ7NBN.js → PublishView-tvxBQLp2.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-DiBztBma.js → PurchaseOrderPrintPreview-CqSijErx.js} +1 -1
  27. package/dist/ReceiveRequestView-Oq87gJ1d.js +2913 -0
  28. package/dist/{RecipeView-BPIMvoTw.js → RecipeView-c7SNUwhq.js} +83 -82
  29. package/dist/{StockView-CI8MUJay.js → StockView-B3ocNf5D.js} +113 -112
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DEBHEMkh.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Br3p4H5X.js} +1 -1
  31. package/dist/{SupplierView-COihDMNY.js → SupplierView-7UHgW64q.js} +28 -27
  32. package/dist/SurchargeView-CkBBz_W1.js +460 -0
  33. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D-c0Ayis.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BxqwBD1A.js} +2 -2
  34. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js +84 -0
  35. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DZxJDrcN.js +201 -0
  36. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BVuuw11z.js → TransferDetails.vue_vue_type_script_setup_true_lang-BP7PC5FE.js} +15 -15
  37. package/dist/{TransferTemplateView-B2NNfrEq.js → TransferTemplateView-gnib1NSD.js} +82 -81
  38. package/dist/{UnitView-ZsbM07hw.js → UnitView-gccTcBDm.js} +20 -19
  39. package/dist/{WarehouseView-Cd5RFu5v.js → WarehouseView-9Tzk2HFV.js} +21 -20
  40. package/dist/WastageTemplateView-bxDDb0it.js +2383 -0
  41. package/dist/api/adjustment-template.d.ts +1 -0
  42. package/dist/api/closing-template.d.ts +1 -0
  43. package/dist/api/netsuite.d.ts +8 -0
  44. package/dist/api/surcharge.d.ts +31 -0
  45. package/dist/app-DiX-EfV6.js +8167 -0
  46. package/dist/{app-CySQTQxj.js → app-S9HQBEDL.js} +4514 -4410
  47. package/dist/app.d.ts +53 -0
  48. package/dist/app.js +1 -1
  49. package/dist/closing-template-DSppbNBU.js +125 -0
  50. package/dist/component-DpCUABT3.js +82 -0
  51. package/dist/components/FmInventoryTableToolbar.vue.d.ts +8 -0
  52. package/dist/components/FmMultiselectDialogProps.d.ts +5 -0
  53. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  54. package/dist/{date2-BWoUn1K_.js → date2-a0EDY-8z.js} +1 -1
  55. package/dist/{dayjs.min-cMW8olEu.js → dayjs.min-D3uqC-FM.js} +26 -26
  56. package/dist/{decimal-8BRzZQU6.js → decimal-iC0dKSbY.js} +2 -2
  57. package/dist/{defineDeepModel-AsUZ-DyW.js → defineDeepModel-sBbNFqqR.js} +1 -1
  58. package/dist/{duplicate-template-CyHfZR3S.js → duplicate-template-Dwe_h80w.js} +1 -1
  59. package/dist/{feature-Dm0FnWf9.js → feature-12j10xt_.js} +8956 -6221
  60. package/dist/{format-time-from-id-C9lmv5BP.js → format-time-from-id-Dyyvx-ha.js} +1 -1
  61. package/dist/{format-unit-display-BV8pJisO.js → format-unit-display-DstE3kKS.js} +11 -11
  62. package/dist/{import-export.helper-Djxw_H5S.js → import-export.helper-CR8rEBJV.js} +5 -5
  63. package/dist/{index-D6u3kywf.js → index-BbpxRM23.js} +1 -1
  64. package/dist/{index-8hCa5_Gb.js → index-Ca8nKTEy.js} +1 -1
  65. package/dist/{index-DidYtgNc.js → index-CvRrsISb.js} +3 -3
  66. package/dist/{lodash-CW_Ea6mA.js → lodash-BiCqhRt2.js} +1 -1
  67. package/dist/netsuite-B84CfGmT.js +5454 -0
  68. package/dist/{purchase-order-template-BTzjcgrO.js → purchase-order-template-ogVLqXnM.js} +1 -1
  69. package/dist/router/name.d.ts +1 -0
  70. package/dist/{rules-DkVWS5mF.js → rules-C0W8tBAK.js} +9 -9
  71. package/dist/{stock-CHw8pI8V.js → stock-BfY956rP.js} +3 -3
  72. package/dist/{stock-D8hLHgeN.js → stock-Dy08ISna.js} +1 -1
  73. package/dist/stores/feature.d.ts +4 -0
  74. package/dist/stores/integration/netsuite.d.ts +5 -0
  75. package/dist/stores/surcharge.d.ts +18 -0
  76. package/dist/style.css +1 -1
  77. package/dist/{supplier-Dv83IfQr.js → supplier-BGfg_Uzv.js} +2 -2
  78. package/dist/surcharge-DZkc9Zxa.js +71 -0
  79. package/dist/tsconfig.app.tsbuildinfo +1 -1
  80. package/dist/{use-ingredient-select-dialog-CJjd4g-6.js → use-ingredient-select-dialog-fOf-xHgn.js} +2 -2
  81. package/dist/{use-inventory-binding-dialog-D4g79p5S.js → use-inventory-binding-dialog-CF6dmCop.js} +2 -2
  82. package/dist/{use-template-enabled-locations-2-Cg2iqQdq.js → use-template-enabled-locations-2-C9YTP8tP.js} +2 -2
  83. package/dist/views/adjustment-template/wastage-template/actions.d.ts +4 -1
  84. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +714 -0
  85. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
  86. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  87. package/dist/views/surcharge/SurchargeView.vue.d.ts +2 -0
  88. package/dist/{vue-i18n-kUcLfpvT.js → vue-i18n-CVvQI1xZ.js} +571 -571
  89. package/dist/{xlsx-BjeMbhDF.js → xlsx-C46Afq2T.js} +1 -1
  90. package/dist/{xlsx.util-9eMlJfd9.js → xlsx.util-iJmlHY2V.js} +1 -1
  91. package/package.json +2 -2
  92. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dgibb-Fh.js +0 -231
  93. package/dist/FmMultiselectDialog-CDONDKxE.js +0 -598
  94. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-YuCn0irA.js +0 -375
  95. package/dist/ReceiveRequestView-_TOSnDGJ.js +0 -2913
  96. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js +0 -162
  97. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D8vbPlie.js +0 -155
  98. package/dist/WastageTemplateView-DpikyyZW.js +0 -2327
  99. package/dist/app-uBuHtW8m.js +0 -8127
  100. package/dist/closing-template-DXGjC5AG.js +0 -117
  101. package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +0 -2
  102. package/dist/netsuite-BEto-z0v.js +0 -5131
  103. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +0 -9
  104. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -22
@@ -1,375 +0,0 @@
1
- import { defineComponent as ee, computed as _, reactive as ne, resolveComponent as k, openBlock as d, createElementBlock as p, createVNode as y, withCtx as U, createElementVNode as n, toDisplayString as m, unref as i, createBlock as B, createCommentVNode as v, Fragment as E, renderList as G, nextTick as oe } from "vue";
2
- import { a as te, G as le, aj as ie, F as se } from "./app-CySQTQxj.js";
3
- import { a as h, q as T, h as C, d as re } from "./rules-DkVWS5mF.js";
4
- import { u as de } from "./use-inventory-binding-dialog-D4g79p5S.js";
5
- import { _ as ae, c as ue, d as me } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CefvebOx.js";
6
- import { useI18n as ce } from "@feedmepos/mf-common";
7
- const pe = { class: "flex flex-col gap-24" }, ye = { class: "flex flex-col gap-16" }, fe = { class: "flex items-center" }, ve = { class: "flex-1 fm-typo-en-title-sm-600" }, be = { class: "flex flex-col" }, ge = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, _e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, he = {
8
- class: "flex items-center",
9
- style: { "min-height": "48px" }
10
- }, Ve = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Be = { class: "flex flex-col" }, ke = { class: "w-[200px]" }, Ie = {
11
- key: 0,
12
- class: "w-[52px]"
13
- }, we = {
14
- key: 0,
15
- class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400 px-8"
16
- }, Fe = {
17
- key: 0,
18
- class: "flex flex-col gap-16"
19
- }, Ue = { class: "flex items-center" }, Ee = { class: "flex-1 fm-typo-en-title-sm-600" }, Ge = { class: "flex flex-col" }, Ce = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ae = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Re = { class: "flex flex-col w-full border-b border-fm-color-neutral-gray-100" }, Se = {
20
- key: 0,
21
- class: "flex gap-4 text-fm-color-system-error-400 fm-typo-en-body-sm-400"
22
- }, Pe = {
23
- class: "flex items-center",
24
- style: { "min-height": "48px" }
25
- }, Ne = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Te = { class: "flex flex-col" }, Me = { class: "w-[200px]" }, De = {
26
- key: 0,
27
- class: "w-[52px]"
28
- }, Ke = { class: "flex flex-col gap-16" }, $e = { class: "flex items-center" }, je = { class: "flex-1 fm-typo-en-title-sm-600" }, ze = { class: "flex flex-col" }, Le = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Oe = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ye = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, qe = {
29
- class: "flex items-center w-full",
30
- style: { "min-height": "48px" }
31
- }, We = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, He = { class: "line-clamp-1" }, Je = { class: "w-[150px]" }, Qe = {
32
- key: 0,
33
- class: "w-[52px]"
34
- }, Xe = { class: "flex flex-col px-12 pb-4" }, sn = /* @__PURE__ */ ee({
35
- __name: "InventoryBindingForm",
36
- props: {
37
- id: {},
38
- modelValue: { default: () => [] },
39
- excludeBindingId: {},
40
- rules: { default: () => [] },
41
- iframeMode: { type: Boolean },
42
- disabled: { type: Boolean },
43
- readonly: { type: Boolean },
44
- enableIngredientGroup: { type: Boolean }
45
- },
46
- emits: ["update:modelValue", "click:pick-inventory-bindings"],
47
- setup(M, { emit: D }) {
48
- const { t: a } = ce(), x = te(), K = _(() => x.recipeById), I = _(() => x.skuById), $ = _(() => x.skuGroupById), s = M, b = D, A = _(() => le({
49
- parentId: s.id,
50
- bindings: s.modelValue,
51
- recipes: x.recipes.map((o) => o._id === s.id ? {
52
- ...o,
53
- contains: s.modelValue
54
- } : o),
55
- skus: x.skus.map((o) => o._id === s.id ? {
56
- ...o,
57
- convert: {
58
- inventoryBindings: s.modelValue
59
- }
60
- } : o),
61
- skuGroups: x.skuGroups
62
- }).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === ie.enum.circularDependency)), w = _(
63
- () => new Set(A.value.map((e) => {
64
- var t;
65
- return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
66
- }))
67
- ), j = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: z, promptRecipesBinding: L, promptIngredientGroupsBinding: O } = de();
68
- async function Y() {
69
- if (s.iframeMode) {
70
- b("click:pick-inventory-bindings", "RECIPE");
71
- return;
72
- }
73
- L(
74
- s.modelValue,
75
- (e) => b("update:modelValue", e),
76
- s.id ? [s.id] : []
77
- );
78
- }
79
- const q = _(() => s.modelValue.filter((e) => e.type === "SKU_GROUP"));
80
- async function W() {
81
- O(
82
- s.modelValue,
83
- (e) => b("update:modelValue", e),
84
- s.id ? [s.id] : []
85
- );
86
- }
87
- const R = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
88
- async function H() {
89
- if (s.iframeMode) {
90
- b("click:pick-inventory-bindings", "SKU");
91
- return;
92
- }
93
- z(
94
- s.modelValue,
95
- (e) => b("update:modelValue", e),
96
- s.excludeBindingId,
97
- s.id ? [s.id] : []
98
- );
99
- }
100
- function S(e, t, o) {
101
- const r = +t;
102
- let f = o;
103
- t.length > 0 && isFinite(r) ? f = o.map((u) => (u.id !== e || (u.amount = re(r)), u)) : f = o.map((u) => (u.id !== e || (u.amount = { amount: 0, precision: 0 }), u)), b("update:modelValue", f);
104
- }
105
- function F(e, t) {
106
- const o = t.filter((r) => r.id !== e);
107
- b("update:modelValue", o);
108
- }
109
- function P(e) {
110
- var o, r;
111
- if (e.type !== se.enum.SKU)
112
- throw new Error("Non-SKU binding does not have unit");
113
- if (!((o = I.value[e.id]) == null ? void 0 : o.unit))
114
- throw new Error(`Cannot find ingredient: ${e.id}`);
115
- return (r = I.value[e.id]) == null ? void 0 : r.unit;
116
- }
117
- function J(e) {
118
- return { amount: e.amount, measurement: e.measurement };
119
- }
120
- function Q(e, t, o) {
121
- const r = o.map((f) => f.id !== e ? f : {
122
- ...f,
123
- amount: t.amount,
124
- measurement: t.measurement
125
- });
126
- b("update:modelValue", r);
127
- }
128
- const N = ne({});
129
- function X(e) {
130
- return N[e.id] ?? {
131
- modelValue: {
132
- amount: e.amount,
133
- measurement: e.measurement
134
- },
135
- amountAsString: h(e.amount)
136
- };
137
- }
138
- function Z(e, t) {
139
- oe(() => {
140
- N[e.id] = {
141
- modelValue: {
142
- amount: e.amount,
143
- measurement: e.measurement
144
- },
145
- amountAsString: t
146
- };
147
- });
148
- }
149
- return (e, t) => {
150
- const o = k("FmFormGroup"), r = k("FmButton"), f = k("FmTextField"), u = k("FmIcon");
151
- return d(), p("div", pe, [
152
- y(o, {
153
- disabled: e.disabled,
154
- "model-value": e.modelValue,
155
- rules: [
156
- ...e.rules,
157
- () => A.value.length ? "There is a binding error in your configuration" : !0
158
- ]
159
- }, {
160
- label: U(() => t[0] || (t[0] = [
161
- n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Define the inventory bindings for this recipe or ingredient. ", -1)
162
- ])),
163
- _: 1
164
- }, 8, ["disabled", "model-value", "rules"]),
165
- n("div", ye, [
166
- n("div", fe, [
167
- n("div", ve, m(i(a)("inventory.inventoryBindings.recipe")), 1),
168
- e.readonly ? v("", !0) : (d(), B(r, {
169
- key: 0,
170
- variant: "secondary",
171
- "text-color": "primary",
172
- "border-color": "primary",
173
- label: i(a)("inventory.inventoryBindings.linkRecipe"),
174
- "prepend-icon": "link",
175
- onClick: Y
176
- }, null, 8, ["label"]))
177
- ]),
178
- n("div", be, [
179
- n("div", ge, [
180
- n("div", _e, m(i(a)("inventory.inventoryBindings.recipe")), 1),
181
- t[1] || (t[1] = n("div", { class: "w-[200px]" }, null, -1)),
182
- t[2] || (t[2] = n("div", { class: "w-[52px]" }, null, -1))
183
- ]),
184
- (d(!0), p(E, null, G(j.value, (l) => (d(), B(o, {
185
- key: l.id,
186
- disabled: e.disabled,
187
- modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
188
- rules: [i(T)(0), i(C)(0)]
189
- }, {
190
- default: U(({ invalid: V }) => {
191
- var g;
192
- return [
193
- n("div", xe, [
194
- n("div", he, [
195
- n("div", Ve, [
196
- n("div", Be, m((g = K.value[l.id]) == null ? void 0 : g.name), 1)
197
- ]),
198
- n("div", ke, [
199
- y(f, {
200
- class: "w-full",
201
- disabled: e.disabled,
202
- modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
203
- "onUpdate:modelValue": (c) => S(l.id, c, e.modelValue),
204
- invalid: V
205
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
206
- ]),
207
- e.readonly ? v("", !0) : (d(), p("div", Ie, [
208
- y(r, {
209
- disabled: e.disabled,
210
- type: "button",
211
- variant: "plain",
212
- icon: "delete",
213
- "icon-color": "#000000",
214
- onClick: (c) => F(l.id, e.modelValue)
215
- }, null, 8, ["disabled", "onClick"])
216
- ]))
217
- ]),
218
- w.value.has(l.id) ? (d(), p("div", we, [
219
- y(u, {
220
- name: "error",
221
- color: "system-error-300",
222
- size: "sm"
223
- }),
224
- n("div", null, m(i(a)("inventory.inventoryBindings.circularError")), 1)
225
- ])) : v("", !0)
226
- ])
227
- ];
228
- }),
229
- _: 2
230
- }, 1032, ["disabled", "modelValue", "rules"]))), 128))
231
- ])
232
- ]),
233
- e.enableIngredientGroup ? (d(), p("div", Fe, [
234
- n("div", Ue, [
235
- n("div", Ee, m(i(a)("inventory.inventoryBindings.ingredientGroup")), 1),
236
- e.readonly ? v("", !0) : (d(), B(r, {
237
- key: 0,
238
- variant: "secondary",
239
- "text-color": "primary",
240
- "border-color": "primary",
241
- label: i(a)("inventory.inventoryBindings.linkIngredientGroup"),
242
- "prepend-icon": "link",
243
- onClick: W
244
- }, null, 8, ["label"]))
245
- ]),
246
- n("div", Ge, [
247
- n("div", Ce, [
248
- n("div", Ae, m(i(a)("inventory.inventoryBindings.ingredientGroup")), 1),
249
- t[3] || (t[3] = n("div", { class: "w-[200px]" }, null, -1)),
250
- t[4] || (t[4] = n("div", { class: "w-[52px]" }, null, -1))
251
- ]),
252
- (d(!0), p(E, null, G(q.value, (l) => (d(), B(o, {
253
- key: l.id,
254
- disabled: e.disabled,
255
- modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
256
- rules: [i(T)(0), i(C)(0)]
257
- }, {
258
- default: U(({ invalid: V }) => {
259
- var g;
260
- return [
261
- n("div", Re, [
262
- w.value.has(l.id) ? (d(), p("div", Se, [
263
- y(u, {
264
- name: "error",
265
- color: "system-error-300",
266
- size: "sm"
267
- }),
268
- n("div", null, m(i(a)("inventory.inventoryBindings.circularError")), 1)
269
- ])) : v("", !0),
270
- n("div", Pe, [
271
- n("div", Ne, [
272
- n("div", Te, m((g = $.value[l.id]) == null ? void 0 : g.name), 1)
273
- ]),
274
- n("div", Me, [
275
- y(f, {
276
- class: "w-full",
277
- disabled: e.disabled,
278
- modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
279
- "onUpdate:modelValue": (c) => S(l.id, c, e.modelValue),
280
- invalid: V
281
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
282
- ]),
283
- e.readonly ? v("", !0) : (d(), p("div", De, [
284
- y(r, {
285
- disabled: e.disabled,
286
- type: "button",
287
- variant: "plain",
288
- icon: "delete",
289
- "icon-color": "#000000",
290
- onClick: (c) => F(l.id, e.modelValue)
291
- }, null, 8, ["disabled", "onClick"])
292
- ]))
293
- ])
294
- ])
295
- ];
296
- }),
297
- _: 2
298
- }, 1032, ["disabled", "modelValue", "rules"]))), 128))
299
- ])
300
- ])) : v("", !0),
301
- n("div", Ke, [
302
- n("div", $e, [
303
- n("div", je, m(i(a)("inventory.inventoryBindings.ingredient")), 1),
304
- e.readonly ? v("", !0) : (d(), B(r, {
305
- key: 0,
306
- variant: "secondary",
307
- "text-color": "primary",
308
- "border-color": "primary",
309
- label: i(a)("inventory.inventoryBindings.linkIngredient"),
310
- "prepend-icon": "link",
311
- onClick: H
312
- }, null, 8, ["label"]))
313
- ]),
314
- n("div", ze, [
315
- n("div", Le, [
316
- n("div", Oe, m(i(a)("inventory.inventoryBindings.ingredient")), 1),
317
- n("div", Ye, m(i(a)("inventory.inventoryBindings.amount")), 1),
318
- t[5] || (t[5] = n("div", { class: "w-[52px]" }, null, -1))
319
- ]),
320
- (d(!0), p(E, null, G(R.value, (l, V) => {
321
- var g;
322
- return d(), p("div", {
323
- key: l.id,
324
- class: "flex flex-col border-b border-fm-color-neutral-gray-100"
325
- }, [
326
- n("div", qe, [
327
- n("div", We, [
328
- n("span", He, m((g = I.value[l.id]) == null ? void 0 : g.name), 1)
329
- ]),
330
- n("div", Je, [
331
- y(ae, {
332
- "model-value": J(l),
333
- "onUpdate:modelValue": (c) => c && Q(l.id, c, e.modelValue),
334
- "onUpdate:amount": (c) => Z(l, c),
335
- unit: P(l),
336
- placement: V === R.value.length - 1 ? "top" : "bottom",
337
- "convert-amount-on-change-unit": "",
338
- disabled: e.readonly
339
- }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
340
- ]),
341
- e.readonly ? v("", !0) : (d(), p("div", Qe, [
342
- y(r, {
343
- disabled: e.disabled,
344
- type: "button",
345
- variant: "tertiary",
346
- icon: "delete",
347
- onClick: (c) => F(l.id, e.modelValue)
348
- }, null, 8, ["disabled", "onClick"])
349
- ]))
350
- ]),
351
- n("div", Xe, [
352
- y(o, {
353
- modelValue: +i(h)(l.amount ?? { amount: 1, precision: 0 }),
354
- rules: [i(C)(0)]
355
- }, null, 8, ["modelValue", "rules"]),
356
- y(o, {
357
- modelValue: X(l),
358
- rules: [
359
- i(ue)(),
360
- i(me)(P(l)),
361
- () => w.value.has(l.id) ? i(a)("inventory.inventoryBindings.invalidWarning") : !0
362
- ]
363
- }, null, 8, ["modelValue", "rules"])
364
- ])
365
- ]);
366
- }), 128))
367
- ])
368
- ])
369
- ]);
370
- };
371
- }
372
- });
373
- export {
374
- sn as _
375
- };