@feedmepos/mf-inventory-portal 0.0.19-dev.9 → 0.0.19

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 (218) hide show
  1. package/dist/App.vue.d.ts +1 -1
  2. package/dist/ApprovalView-BYCFc1rD.js +118 -0
  3. package/dist/{BindingsDialog-XDkcjW_c.js → BindingsDialog-CFGZBbFQ.js} +27 -26
  4. package/dist/{BindingsPicker-CgbiqX72.js → BindingsPicker-BQnwsNNJ.js} +19 -18
  5. package/dist/BindingsTable-CgTP4Qzq.js +122 -0
  6. package/dist/Entry.vue.d.ts +1 -1
  7. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C-t2Ewu7.js +268 -0
  8. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-C65yZWQv.js +143 -0
  9. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-BgI_yys8.js +236 -0
  10. package/dist/IngredientsView-BpcwOWVw.js +1672 -0
  11. package/dist/IntegrationView-Dgd5ZET2.js +1166 -0
  12. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-D1fdMNkv.js +276 -0
  13. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-XXoPyhlc.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpryhFlY.js} +1 -1
  14. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +35 -0
  15. package/dist/PurchaseOrderPrintPreview-BZAl56sp.js +152 -0
  16. package/dist/ReceiveRequestView-CkMiR1x6.js +1394 -0
  17. package/dist/RecipeView-1yhjLuc7.js +573 -0
  18. package/dist/Standalone.vue.d.ts +1 -1
  19. package/dist/StockForecast.vue_vue_type_style_index_0_lang-C5DiRLSi.js +58 -0
  20. package/dist/StockView-D7cAEre3.js +1850 -0
  21. package/dist/SupplierView-B9ujHmNi.js +796 -0
  22. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CVzwad1C.js +1028 -0
  23. package/dist/UnitView-DhibVZYz.js +635 -0
  24. package/dist/WarehouseView-CjYUMHgm.js +1041 -0
  25. package/dist/api/bill.d.ts +240 -86
  26. package/dist/api/inventory.d.ts +3 -3
  27. package/dist/api/stock.d.ts +0 -8
  28. package/dist/app---xe3UFh.js +44158 -0
  29. package/dist/app.d.ts +0 -1072
  30. package/dist/app.js +3 -7
  31. package/dist/{array-AvWd53LI.js → array-ClJzD_Lt.js} +3 -3
  32. package/dist/components/ChangeLocationComponent.vue.d.ts +1 -1
  33. package/dist/components/DeferableLoading.vue.d.ts +1 -1
  34. package/dist/components/DeleteDialog.vue.d.ts +1 -1
  35. package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
  36. package/dist/components/FmDroppableField.vue.d.ts +7 -7
  37. package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
  38. package/dist/components/FmInventoryTableToolbar.vue.d.ts +3 -3
  39. package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
  40. package/dist/components/FmUnitInputProps.d.ts +0 -2
  41. package/dist/components/FmUnitInputRules.d.ts +0 -1
  42. package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
  43. package/dist/components/NavigationTab.vue.d.ts +1 -1
  44. package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
  45. package/dist/components/PremiumBadge.vue.d.ts +3 -3
  46. package/dist/components/PreviewBadge.vue.d.ts +3 -3
  47. package/dist/components/StockForecast.vue.d.ts +1 -1
  48. package/dist/components/TableActionableRow.vue.d.ts +4 -4
  49. package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
  50. package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
  51. package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
  52. package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
  53. package/dist/components/icons/IconSupport.vue.d.ts +1 -1
  54. package/dist/components/icons/IconTooling.vue.d.ts +1 -1
  55. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +6 -6
  56. package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
  57. package/dist/components/map/GoogleMap.vue.d.ts +6 -6
  58. package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
  59. package/dist/components/row-action.enum.d.ts +0 -2
  60. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
  61. package/dist/components/shell/inventory/binding-ui.vue.d.ts +6 -6
  62. package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
  63. package/dist/composable/useIframe.d.ts +1 -1
  64. package/dist/composable/useSearch.d.ts +1 -1
  65. package/dist/date2-BwBD2dPC.js +95 -0
  66. package/dist/dayjs.min-BIvfV9G2.js +282 -0
  67. package/dist/{decimal-D3KXLC4T.js → decimal-DO2EIT3e.js} +1 -1
  68. package/dist/fuzzy-DTciL0gQ.js +41 -0
  69. package/dist/helper/country.d.ts +0 -2
  70. package/dist/index-DXRQ-5FZ.js +21515 -0
  71. package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
  72. package/dist/layout/InventoryLayout.vue.d.ts +1 -1
  73. package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
  74. package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
  75. package/dist/layout-DyCIklP3.js +151 -0
  76. package/dist/number-DnmKt8In.js +97 -0
  77. package/dist/router/name.d.ts +1 -2
  78. package/dist/row-action.enum-BwQbURNh.js +28 -0
  79. package/dist/rules-B06X_jy0.js +85 -0
  80. package/dist/stock-estimate-B1IURgC4.js +122 -0
  81. package/dist/stores/feature.d.ts +1 -1
  82. package/dist/stores/inventory.d.ts +4 -4
  83. package/dist/stores/location.d.ts +112 -148
  84. package/dist/stores/supplier.d.ts +9 -92
  85. package/dist/stores/warehouse.d.ts +9 -5
  86. package/dist/style.css +1 -1
  87. package/dist/supplier-Bsh2DwUw.js +65 -0
  88. package/dist/tsconfig.app.tsbuildinfo +1 -1
  89. package/dist/use-inventory-binding-dialog-CZOU4sQ3.js +93 -0
  90. package/dist/views/InventoryView.vue.d.ts +1 -1
  91. package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
  92. package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
  93. package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
  94. package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
  95. package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
  96. package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
  97. package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
  98. package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
  99. package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
  100. package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
  101. package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
  102. package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
  103. package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
  104. package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
  105. package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
  106. package/dist/views/home/HomeView.vue.d.ts +1 -1
  107. package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
  108. package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
  109. package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
  110. package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
  111. package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
  112. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
  113. package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
  114. package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
  115. package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
  116. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
  117. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +6 -6
  118. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -7
  119. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +4 -16
  120. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +3 -2
  121. package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
  122. package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
  123. package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
  124. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
  125. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
  126. package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
  127. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
  128. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
  129. package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
  130. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +0 -1
  131. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +5 -5
  132. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +32 -34
  133. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -1
  134. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1009 -69
  135. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +48 -54
  136. package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
  137. package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
  138. package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
  139. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
  140. package/dist/views/recipe/composables/use-recipe-form.d.ts +4 -16
  141. package/dist/views/recipe/composables/use-recipe-table.d.ts +2 -1
  142. package/dist/views/stock/StockView.vue.d.ts +1 -1
  143. package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
  144. package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
  145. package/dist/views/stock/components/StockRecordCard.vue.d.ts +124 -47
  146. package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
  147. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +7 -7
  148. package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
  149. package/dist/views/stock/composables/use-stock-table.d.ts +8 -1
  150. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  151. package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
  152. package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
  153. package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
  154. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
  155. package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
  156. package/dist/views/unit/UnitView.vue.d.ts +1 -1
  157. package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
  158. package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
  159. package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
  160. package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
  161. package/dist/views/unit/composables/use-unit-form.d.ts +4 -16
  162. package/dist/views/unit/composables/use-unit-table.d.ts +2 -1
  163. package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
  164. package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
  165. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
  166. package/dist/{xlsx-B-2KyDJq.js → xlsx-D5cXKkCp.js} +3383 -3383
  167. package/dist/xlsx.util-Chgrxsn1.js +107 -0
  168. package/package.json +6 -6
  169. package/dist/ApprovalView-Bcxk6B7K.js +0 -121
  170. package/dist/BindingsTable-xNXNsBAd.js +0 -145
  171. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DFPkUHl-.js +0 -272
  172. package/dist/IngredientsView-DD7ns3mP.js +0 -1751
  173. package/dist/IntegrationView-CErHEVAO.js +0 -1172
  174. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BpyUheXn.js +0 -88
  175. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +0 -29
  176. package/dist/PurchaseOrderPrintPreview-L_iaaURb.js +0 -152
  177. package/dist/ReceiveRequestView-BKbeFDxm.js +0 -208
  178. package/dist/RecipeView-Drp4l4gL.js +0 -573
  179. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
  180. package/dist/StockView-Cj6fErwD.js +0 -1877
  181. package/dist/SupplierView-EFsHWet-.js +0 -801
  182. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kM5fyqq6.js +0 -745
  183. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-CyFMCmXw.js +0 -1605
  184. package/dist/TransferTemplateView-Cymhrayh.js +0 -933
  185. package/dist/UnitView-C_tAxIpq.js +0 -638
  186. package/dist/WarehouseView-BAqVtbD6.js +0 -1050
  187. package/dist/api/purchase-order-template.d.ts +0 -7
  188. package/dist/app-CeUU5Gd8.js +0 -66938
  189. package/dist/composable/defineDeepModel.d.ts +0 -2
  190. package/dist/id-to-date-Cj02m808.js +0 -30
  191. package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
  192. package/dist/layout-2zzAZIVO.js +0 -147
  193. package/dist/purchase-order-transaction-type-Dz0YF5qh.js +0 -294
  194. package/dist/row-action.enum-7jVyol1k.js +0 -36
  195. package/dist/supplier-mDVKd7Ge.js +0 -54
  196. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +0 -26
  197. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +0 -9
  198. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -16
  199. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +0 -187
  200. package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +0 -23
  201. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +0 -21
  202. package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +0 -9
  203. package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +0 -6
  204. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -111
  205. package/dist/views/receive-request/helper/get-transfer-type.d.ts +0 -2
  206. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
  207. package/dist/views/stock/composables/use-stock-action.d.ts +0 -26
  208. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +0 -2
  209. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +0 -22
  210. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +0 -10
  211. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +0 -16
  212. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +0 -7
  213. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +0 -18
  214. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +0 -116
  215. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +0 -112
  216. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +0 -470
  217. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +0 -290
  218. package/dist/xlsx.util-D6EzRE71.js +0 -109
package/dist/App.vue.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
2
  export default _default;
@@ -0,0 +1,118 @@
1
+ import { defineComponent as Z, ref as h, watch as B, computed as I, resolveComponent as ee, openBlock as D, createBlock as H, withCtx as g, createElementVNode as n, createVNode as s, unref as e, normalizeStyle as te, toDisplayString as ae, createElementBlock as oe, createCommentVNode as re, Teleport as se, mergeProps as ne } from "vue";
2
+ import { r as f, f as le } from "./app---xe3UFh.js";
3
+ import { b as ce, _ as ie, a as pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C-t2Ewu7.js";
4
+ import { a as ue, b as me, _ as de } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CVzwad1C.js";
5
+ import { c as U } from "./date2-BwBD2dPC.js";
6
+ import { _ as fe, F as _, u as _e } from "./layout-DyCIklP3.js";
7
+ import { useBreakpoints as ve } from "@feedmepos/ui-library";
8
+ const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De = { class: "flex flex-col py-8" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, ye = {
9
+ key: 0,
10
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
11
+ }, we = { class: "pt-8" }, ze = /* @__PURE__ */ Z({
12
+ __name: "ApprovalView",
13
+ setup(Re) {
14
+ const o = ue("approval"), { columnDefs: G } = me("approval", o), J = le();
15
+ f.object({
16
+ name: f.string().optional().nullable(),
17
+ start: f.date().optional().nullable(),
18
+ end: f.date().optional().nullable()
19
+ });
20
+ const b = h({
21
+ name: "",
22
+ ...ce()
23
+ }), a = h({
24
+ startDate: U(b.value.start ?? /* @__PURE__ */ new Date()),
25
+ endDate: U(b.value.end ?? /* @__PURE__ */ new Date())
26
+ });
27
+ B([() => a.value.startDate], () => {
28
+ if (!a.value.startDate)
29
+ return;
30
+ if (!a.value.endDate) {
31
+ a.value.endDate = a.value.startDate;
32
+ return;
33
+ }
34
+ const y = new Date(a.value.startDate);
35
+ if (new Date(a.value.endDate).getTime() < y.getTime()) {
36
+ a.value.endDate = a.value.startDate;
37
+ return;
38
+ }
39
+ });
40
+ const v = h(""), { breakpoints: x } = ve(), K = I(() => x.value.xs || x.value.sm ? 10 : 20), Q = _e();
41
+ return (y, l) => {
42
+ const W = ee("FmTable");
43
+ return D(), H(ie, { title: "Approval" }, {
44
+ default: g(() => [
45
+ n("div", he, [
46
+ s(pe, {
47
+ searchable: "",
48
+ "change-location": "",
49
+ search: v.value,
50
+ "onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
51
+ actions: [{ icon: "refresh", onClick: e(o).fetchData }]
52
+ }, null, 8, ["search", "actions"]),
53
+ s(W, {
54
+ style: te(e(Q).tableHeight),
55
+ "column-defs": e(G),
56
+ "row-data": e(o).purchaseRequests.value,
57
+ "search-value": v.value,
58
+ loading: !e(J)._currentLocation || e(o).loading.value,
59
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
60
+ "page-size": K.value
61
+ }, {
62
+ "list-row": g((r) => [
63
+ s(fe, {
64
+ row: r,
65
+ onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
66
+ }, {
67
+ default: g((t) => {
68
+ var w, R, k, c, O, S, T, C, i, F, $, p, z, u, M, V, Y, q, L, m, N, j, A, E, d, P;
69
+ return [
70
+ n("div", De, [
71
+ n("div", ge, [
72
+ s(e(_), {
73
+ render: (k = (R = (w = t.purchaseOrder__id) == null ? void 0 : w.column) == null ? void 0 : R.columnDef) == null ? void 0 : k.cell,
74
+ props: (O = (c = t.purchaseOrder__id) == null ? void 0 : c.getContext) == null ? void 0 : O.call(c)
75
+ }, null, 8, ["render", "props"])
76
+ ]),
77
+ n("div", be, [
78
+ s(e(_), {
79
+ render: (C = (T = (S = t.to_name) == null ? void 0 : S.column) == null ? void 0 : T.columnDef) == null ? void 0 : C.cell,
80
+ props: (F = (i = t.to_name) == null ? void 0 : i.getContext) == null ? void 0 : F.call(i)
81
+ }, null, 8, ["render", "props"])
82
+ ]),
83
+ n("div", xe, ae((M = (u = (z = (p = ($ = r.original.purchaseOrder) == null ? void 0 : $.items) == null ? void 0 : p.map) == null ? void 0 : z.call(p, (X) => `${X.name}`)) == null ? void 0 : u.join) == null ? void 0 : M.call(u, ", ")), 1),
84
+ (V = r.original.purchaseOrder) != null && V.ref ? (D(), oe("div", ye, [
85
+ s(e(_), {
86
+ render: (L = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
87
+ props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
88
+ }, null, 8, ["render", "props"])
89
+ ])) : re("", !0),
90
+ n("div", we, [
91
+ s(e(_), {
92
+ render: (E = (A = (j = t.purchaseOrder_status) == null ? void 0 : j.column) == null ? void 0 : A.columnDef) == null ? void 0 : E.cell,
93
+ props: (P = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : P.call(d)
94
+ }, null, 8, ["render", "props"])
95
+ ])
96
+ ])
97
+ ];
98
+ }),
99
+ _: 2
100
+ }, 1032, ["row", "onRowClick"])
101
+ ]),
102
+ _: 1
103
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
104
+ ]),
105
+ (D(), H(se, { to: "body" }, [
106
+ s(de, ne(e(o).transferDetailsProps.value, {
107
+ onSubmitted: e(o).fetchData
108
+ }), null, 16, ["onSubmitted"])
109
+ ]))
110
+ ]),
111
+ _: 1
112
+ });
113
+ };
114
+ }
115
+ });
116
+ export {
117
+ ze as default
118
+ };
@@ -1,75 +1,76 @@
1
- import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
- import { u as V, aj as L, _ as S } from "./app-CeUU5Gd8.js";
1
+ import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as d, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-D1fdMNkv.js";
3
+ import { u as L, A as S } from "./app---xe3UFh.js";
3
4
  const U = {
4
5
  key: 0,
5
6
  class: "flex justify-end gap-8 items-center"
6
- }, j = {
7
+ }, E = {
7
8
  key: 1,
8
9
  class: "p-24 flex items-center justify-center gap-16"
9
- }, E = /* @__PURE__ */ P("div", null, "Loading bindings dialog...", -1), D = /* @__PURE__ */ C({
10
+ }, D = /* @__PURE__ */ C({
10
11
  __name: "BindingsDialog",
11
12
  setup(N) {
12
- const p = V(), d = o(!0), s = o(new Array()), u = o(), n = L(y);
13
+ const p = L(), u = o(!0), s = o(new Array()), c = o(), t = S(y);
13
14
  async function y() {
14
- await p.readInventory(), u.value = n.onMessage("props:inventory-bindings", (e) => {
15
- d.value = !1, s.value = e;
15
+ await p.readInventory(), c.value = t.onMessage("props:inventory-bindings", (e) => {
16
+ u.value = !1, s.value = e;
16
17
  }).onMessage("props:inventory-bindings:validate", () => {
17
18
  var e;
18
19
  (e = f.value) == null || e.validateInputs();
19
- }), n.sendMessage("props:inventory-bindings");
20
+ }), t.sendMessage("props:inventory-bindings");
20
21
  }
21
22
  function b() {
22
- n.sendMessage("@submit:inventory-bindings", s.value);
23
+ t.sendMessage("@submit:inventory-bindings", s.value);
23
24
  }
24
25
  function _() {
25
- n.sendMessage("@close:inventory-bindings");
26
+ t.sendMessage("@close:inventory-bindings");
26
27
  }
27
28
  function k(e) {
28
- n.sendMessage("@click:pick-inventory-bindings", e);
29
+ t.sendMessage("@click:pick-inventory-bindings", e);
29
30
  }
30
31
  const m = o(), r = o(!0);
31
32
  M(() => {
32
33
  v();
33
34
  const e = m.value;
34
35
  e && new ResizeObserver(() => {
35
- n.sendMessage("resize", e.scrollHeight);
36
+ t.sendMessage("resize", e.scrollHeight);
36
37
  }).observe(e);
37
38
  }), F(() => {
38
- var e, t;
39
- (t = (e = u.value) == null ? void 0 : e.removeEventListener) == null || t.call(e);
39
+ var e, n;
40
+ (n = (e = c.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
40
41
  }), x([() => s.value], ([e]) => {
41
- n.sendMessage("@update:inventory-bindings", e);
42
+ t.sendMessage("@update:inventory-bindings", e);
42
43
  });
43
44
  function v() {
44
45
  const e = new URLSearchParams(window.location.href.split("?")[1] || "");
45
46
  console.log(v.name, e, e.has("hideButton")), r.value = e.has("hideButton");
46
47
  }
47
48
  const f = o();
48
- return (e, t) => {
49
- const g = l("FmButton"), h = l("FmForm"), B = l("FmCircularProgress");
50
- return i(), c("div", {
49
+ return (e, n) => {
50
+ const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
51
+ return i(), d("div", {
51
52
  class: "bg-white",
52
53
  ref_key: "resizeableRef",
53
54
  ref: m
54
55
  }, [
55
- d.value ? (i(), c("div", j, [
56
- a(B, { size: "md" }),
57
- E
58
- ])) : (i(), I(h, {
56
+ u.value ? (i(), d("div", E, [
57
+ a(h, { size: "md" }),
58
+ n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
59
+ ])) : (i(), I(B, {
59
60
  key: 0,
60
- onValidationSuccess: t[1] || (t[1] = () => r.value ? void 0 : b()),
61
+ onValidationSuccess: n[1] || (n[1] = () => r.value ? void 0 : b()),
61
62
  ref_key: "formRef",
62
63
  ref: f,
63
64
  class: "flex flex-col gap-16"
64
65
  }, {
65
66
  default: R(() => [
66
- a(S, {
67
+ a(V, {
67
68
  "model-value": s.value,
68
- "onUpdate:modelValue": t[0] || (t[0] = (w) => s.value = w),
69
+ "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value = w),
69
70
  "iframe-mode": "",
70
71
  "onClick:pickInventoryBindings": k
71
72
  }, null, 8, ["model-value"]),
72
- r.value ? z("", !0) : (i(), c("div", U, [
73
+ r.value ? z("", !0) : (i(), d("div", U, [
73
74
  a(g, {
74
75
  type: "button",
75
76
  variant: "tertiary",
@@ -1,22 +1,23 @@
1
1
  import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
2
- import { u as x, aj as M, y as h } from "./app-CeUU5Gd8.js";
3
- const z = {
2
+ import { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-C65yZWQv.js";
3
+ import { u as M, A as z } from "./app---xe3UFh.js";
4
+ const K = {
4
5
  key: 0,
5
6
  class: "flex flex-col gap-16"
6
- }, K = { class: "flex justify-end gap-8 items-center" }, w = {
7
+ }, w = { class: "flex justify-end gap-8 items-center" }, F = {
7
8
  key: 1,
8
9
  class: "p-24 flex items-center justify-center gap-16"
9
- }, F = /* @__PURE__ */ k("div", null, "Loading bindings dialog...", -1), A = /* @__PURE__ */ S({
10
+ }, N = /* @__PURE__ */ S({
10
11
  __name: "BindingsPicker",
11
- setup(j) {
12
- const d = x(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
12
+ setup(L) {
13
+ const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
13
14
  label: s.name,
14
15
  sublabel: s.code,
15
16
  value: s
16
17
  })) : C.value.map((s) => ({
17
18
  label: s.name,
18
19
  value: s
19
- }))), _ = r({
20
+ }))), b = r({
20
21
  get() {
21
22
  if (a.value === "SKU") {
22
23
  const e = i.value.filter((n) => n.type === "SKU");
@@ -62,9 +63,9 @@ const z = {
62
63
  ];
63
64
  }
64
65
  }
65
- }), b = l(), o = M(B);
66
+ }), _ = l(), o = z(B);
66
67
  async function B() {
67
- await d.readInventory(), b.value = o.onMessage(
68
+ await d.readInventory(), _.value = o.onMessage(
68
69
  "props:binding-items",
69
70
  (e) => {
70
71
  g.value = !1, a.value = e.type, i.value = e.bindings;
@@ -85,7 +86,7 @@ const z = {
85
86
  }).observe(e);
86
87
  }), V(() => {
87
88
  var e, s;
88
- (s = (e = b.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
89
+ (s = (e = _.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
89
90
  }), (e, s) => {
90
91
  const n = E("FmButton"), t = E("FmCircularProgress");
91
92
  return p(), f("div", {
@@ -93,16 +94,16 @@ const z = {
93
94
  ref_key: "resizeableRef",
94
95
  ref: y
95
96
  }, [
96
- g.value ? (p(), f("div", w, [
97
+ g.value ? (p(), f("div", F, [
97
98
  u(t, { size: "md" }),
98
- F
99
- ])) : (p(), f("div", z, [
100
- u(h, {
101
- "model-value": _.value,
102
- "onUpdate:modelValue": s[0] || (s[0] = (m) => _.value = m),
99
+ s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
100
+ ])) : (p(), f("div", K, [
101
+ u(x, {
102
+ "model-value": b.value,
103
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
103
104
  items: c.value
104
105
  }, null, 8, ["model-value", "items"]),
105
- k("div", K, [
106
+ k("div", w, [
106
107
  u(n, {
107
108
  variant: "tertiary",
108
109
  label: "Close",
@@ -119,5 +120,5 @@ const z = {
119
120
  }
120
121
  });
121
122
  export {
122
- A as default
123
+ N as default
123
124
  };
@@ -0,0 +1,122 @@
1
+ import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as L, Fragment as F, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
2
+ import { i as b, u as P, A as R } from "./app---xe3UFh.js";
3
+ import "./index-DXRQ-5FZ.js";
4
+ import "@feedmepos/ui-library";
5
+ import "./fuzzy-DTciL0gQ.js";
6
+ import "./dayjs.min-BIvfV9G2.js";
7
+ const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, A = /* @__PURE__ */ x({
8
+ __name: "binding-ui",
9
+ props: {
10
+ items: { default: () => [] },
11
+ recipes: { default: () => [] },
12
+ skus: { default: () => [] },
13
+ type: { default: "Product" },
14
+ editable: { type: Boolean, default: !1 }
15
+ },
16
+ emits: ["click:open-binding-dialog"],
17
+ setup(_, { emit: a }) {
18
+ const d = r({
19
+ isOpen: !1,
20
+ initialValue: [],
21
+ context: "",
22
+ name: ""
23
+ });
24
+ C("closeDialog", () => {
25
+ d.value.isOpen = !d.value.isOpen;
26
+ });
27
+ const n = _, f = a, m = g(() => n.items.map((s) => ({
28
+ key: s.key,
29
+ name: s.name,
30
+ _skuLinked: s.bindings.filter(
31
+ ({ type: t, id: e }) => t === b.enum.SKU && n.skus.some((c) => c._id === e)
32
+ ).length,
33
+ _recipeLinked: s.bindings.filter(
34
+ ({ type: t, id: e }) => t === b.enum.RECIPE && n.recipes.some((c) => c._id === e)
35
+ ).length,
36
+ onUpdate: async () => {
37
+ n.editable && f("click:open-binding-dialog", n.type, s);
38
+ }
39
+ })));
40
+ return (k, s) => {
41
+ const t = h("FmButton");
42
+ return l(), u("div", U, [
43
+ s[0] || (s[0] = L('<div class="flex font-bold bg-[#F7F8FA]"><div class="flex-grow-0 flex-shrink-0 basis-5/12 py-8"></div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Ingredient</div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Recipe</div><div class="flex-grow-0 flex-shrink-0 basis-1/12 py-8"></div></div>', 1)),
44
+ (l(!0), u(F, null, I(m.value, (e) => (l(), u("div", {
45
+ key: e.key,
46
+ class: "cursor-pointer flex border-t border-[rgba(17,32,47,0.15] items-center",
47
+ onClick: e.onUpdate
48
+ }, [
49
+ p("div", O, v(e.name), 1),
50
+ p("div", V, v(e._skuLinked ? `${e._skuLinked} linked` : "Not linked"), 1),
51
+ p("div", S, v(e._recipeLinked ? `${e._recipeLinked} linked` : "Not linked"), 1),
52
+ p("div", $, [
53
+ w(t, {
54
+ variant: "tertiary",
55
+ icon: "edit",
56
+ "icon-color": "#000",
57
+ size: "md",
58
+ disabled: !n.editable,
59
+ type: "button",
60
+ onClick: N(e.onUpdate, ["stop"])
61
+ }, null, 8, ["disabled", "onClick"])
62
+ ])
63
+ ], 8, D))), 128))
64
+ ]);
65
+ };
66
+ }
67
+ }), T = {
68
+ key: 1,
69
+ class: "p-24 flex items-center justify-center gap-16"
70
+ }, J = /* @__PURE__ */ x({
71
+ __name: "BindingsTable",
72
+ setup(_) {
73
+ const a = P(), d = r(!0), n = r(new Array()), f = g(() => a.recipes), m = g(() => a.skus), k = r(""), s = R(e), t = r();
74
+ async function e() {
75
+ await a.readInventory(), t.value = s.onMessage(
76
+ "props:grouped-bindings",
77
+ (i) => {
78
+ d.value = !1, n.value = i;
79
+ }
80
+ ), s.sendMessage("props:grouped-bindings");
81
+ }
82
+ async function c(i, o) {
83
+ s.sendMessage("@click:open-binding-dialog", {
84
+ key: i,
85
+ binding: o
86
+ });
87
+ }
88
+ const y = r();
89
+ return E(() => {
90
+ const i = y.value;
91
+ i && new ResizeObserver(() => {
92
+ s.sendMessage("resize", i.scrollHeight);
93
+ }).observe(i);
94
+ }), z(() => {
95
+ var i, o;
96
+ (o = (i = t.value) == null ? void 0 : i.removeEventListener) == null || o.call(i);
97
+ }), (i, o) => {
98
+ const B = h("FmCircularProgress");
99
+ return l(), u("div", {
100
+ class: "bg-white",
101
+ ref_key: "resizeableRef",
102
+ ref: y
103
+ }, [
104
+ d.value ? (l(), u("div", T, [
105
+ w(B, { size: "md" }),
106
+ o[0] || (o[0] = p("div", null, "Loading bindings table...", -1))
107
+ ])) : (l(), M(A, {
108
+ key: 0,
109
+ items: n.value,
110
+ recipes: f.value,
111
+ skus: m.value,
112
+ type: k.value,
113
+ editable: "",
114
+ "onClick:openBindingDialog": c
115
+ }, null, 8, ["items", "recipes", "skus", "type"]))
116
+ ], 512);
117
+ };
118
+ }
119
+ });
120
+ export {
121
+ J as default
122
+ };
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
2
  export default _default;