@feedmepos/mf-inventory-portal 1.2.44-dev.2 → 1.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BO6IVlu7.js → App-rDJK0k1o.js} +3 -3
- package/dist/{ApprovalView-CVX6nsha.js → ApprovalView-D6_NjTMR.js} +5 -5
- package/dist/{BindingsDialog-CvoCVSNi.js → BindingsDialog-DAiNQNr0.js} +2 -2
- package/dist/{BindingsPicker-BgJRr_DM.js → BindingsPicker-CBRzm6R1.js} +2 -2
- package/dist/{BindingsTable-CoXmqfkS.js → BindingsTable-Jg-neO3F.js} +3 -3
- package/dist/{ClosingDraftView-DJOHSc45.js → ClosingDraftView-ChyEiH1o.js} +8 -8
- package/dist/{ClosingHistoryView-D_-BFRz0.js → ClosingHistoryView-DjlGBU5O.js} +3 -3
- package/dist/{ClosingTemplateView-Bk3D5Snj.js → ClosingTemplateView-Bji6A_pC.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-Cb64kpGv.js → DeliveryOrderPrintPreview-D42JLvjd.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFANhaaJ.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ViI_uhZx.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DF_WpezC.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xXhG-DmK.js} +2 -2
- package/dist/{FmMultiselectDialog-DeHxbT6C.js → FmMultiselectDialog-C3ip4IEJ.js} +1 -1
- package/dist/{FmMultiselectDialog-Cfc5qRdH.js → FmMultiselectDialog-Zg4QAuZ8.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BrCLK3_O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DIUMW2nw.js} +3 -3
- package/dist/{ImportView-CwTD-Oy5.js → ImportView-Bm8LjiIn.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLq0PwYt.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CYk23m7h.js} +1 -1
- package/dist/{IngredientGroupView-C9IrJkA2.js → IngredientGroupView-D6Ti6Pu6.js} +5 -5
- package/dist/{IngredientsView-cx05yMa1.js → IngredientsView-D5RxhF62.js} +14 -14
- package/dist/{IntegrationView-DyhKmpP1.js → IntegrationView-B8gVpqpb.js} +338 -336
- package/dist/{InventoryBindingForm-BiPyN399.js → InventoryBindingForm-C74n5-Ip.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B4hiEtLq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-3Vhr5ODW.js} +4 -4
- package/dist/{InventoryBindingSummary-CLipXxCy.js → InventoryBindingSummary-BTfqeqeu.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-dpwW1B9T.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DcPE6UqX.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CFi82_2z.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DJV-1Tjv.js} +2 -2
- package/dist/{PublishView-xqkAIXWI.js → PublishView-DmBj-unJ.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DQgycOZX.js → PurchaseOrderPrintPreview-BWD392_G.js} +1 -1
- package/dist/{ReceiveRequestView-Bteeg8L4.js → ReceiveRequestView-TfQ1cenb.js} +55 -53
- package/dist/{RecipeView-Wr4d3B_9.js → RecipeView-M4ymed0Q.js} +8 -8
- package/dist/{StockView-CkKpgWUl.js → StockView-C7z4a6QE.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DSGGTbPw.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Di029YaN.js} +1 -1
- package/dist/{SupplierView-BK-t2Qtu.js → SupplierView-LEYmhFla.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D7L13xxB.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DivExDxx.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DWMif1dO.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C2jmjwOT.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-0tyNbKG0.js → TransferDetails.vue_vue_type_script_setup_true_lang-9uh_SH2T.js} +14 -14
- package/dist/{TransferTemplateView-qIlYcciH.js → TransferTemplateView-1JMSw8-R.js} +15 -15
- package/dist/{UnitView-B5boUZuR.js → UnitView-DJAefgnn.js} +6 -6
- package/dist/{WarehouseView-C3PXZgeW.js → WarehouseView-EsGx7CGP.js} +5 -5
- package/dist/{WastageTemplateView-BfJZ5Heq.js → WastageTemplateView-DBEXUwiT.js} +14 -14
- package/dist/api/netsuite.d.ts +4 -0
- package/dist/{app-IXE7AiJd.js → app-Nk4Y77Qj.js} +7 -7
- package/dist/app.js +1 -1
- package/dist/{closing-template-Bdb3yRUm.js → closing-template-wHoDakzO.js} +1 -1
- package/dist/{date2-FhBpgAsI.js → date2-DD_njicn.js} +1 -1
- package/dist/{dayjs.min-DzvYG-ky.js → dayjs.min-DIAxGyLq.js} +1 -1
- package/dist/{decimal-Io-Hwy_Y.js → decimal-BG_5gQlG.js} +2 -2
- package/dist/{defineDeepModel-D8sQDXuo.js → defineDeepModel-zNL5oQNT.js} +1 -1
- package/dist/{duplicate-template-DnygqbZo.js → duplicate-template-Dc8wYFVp.js} +1 -1
- package/dist/{feature-C4FdNiJm.js → feature-Coz9xh98.js} +279 -277
- package/dist/{format-time-from-id-oJMEPmai.js → format-time-from-id-C348W2sq.js} +1 -1
- package/dist/{format-unit-display-CyyP1TnC.js → format-unit-display-CFvZVBzb.js} +10 -10
- package/dist/{import-export.helper-C33N1h7C.js → import-export.helper-BiQb8N-1.js} +5 -5
- package/dist/{index-DdtrR7II.js → index-C-t3Z7Nq.js} +1 -1
- package/dist/{index-qDt3kqgv.js → index-C5yw1jFl.js} +1 -1
- package/dist/{index-DYfJ9nqH.js → index-De0Df7gB.js} +3 -3
- package/dist/{lodash-DRz5U0Za.js → lodash-COQBllYw.js} +1 -1
- package/dist/{netsuite-CIv-Yh60.js → netsuite-BImilKq9.js} +418 -411
- package/dist/{purchase-order-template-CX62LUzz.js → purchase-order-template-P3Xdw5Wn.js} +1 -1
- package/dist/{rules-DmJTahUJ.js → rules-C08N8B1y.js} +3 -3
- package/dist/{stock-dMNUMGOC.js → stock-BnhLE4SG.js} +1 -1
- package/dist/{stock-BAtpqZgN.js → stock-DC6One3R.js} +3 -3
- package/dist/{supplier-B2g3AW72.js → supplier-BjAFZVCS.js} +2 -2
- package/dist/{use-ingredient-select-dialog-ZyFtPCb9.js → use-ingredient-select-dialog-DO65mpQD.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CRgPd2qi.js → use-inventory-binding-dialog-DOOmS-6l.js} +2 -2
- package/dist/{use-template-enabled-locations-2-S598U0zh.js → use-template-enabled-locations-2-CahQ52Ro.js} +2 -2
- package/dist/{vue-i18n-CoLcy8bm.js → vue-i18n-Da-yf5Lo.js} +378 -378
- package/dist/{xlsx-CtFn9Ikt.js → xlsx-BVMVIxuA.js} +398 -398
- package/dist/{xlsx.util-C5Ug4P4c.js → xlsx.util-Dm__KhD6.js} +1 -1
- package/package.json +2 -2
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { defineComponent as Y, mergeModels as Pe, useModel as ke, onMounted as ie, ref as L, computed as O, resolveComponent as F, openBlock as x, createElementBlock as E, createElementVNode as
|
|
1
|
+
import { defineComponent as Y, mergeModels as Pe, useModel as ke, onMounted as ie, ref as L, computed as O, resolveComponent as F, openBlock as x, createElementBlock as E, createElementVNode as l, toDisplayString as R, unref as V, createVNode as A, createBlock as H, withCtx as N, Fragment as P, renderList as ee, normalizeClass as q, normalizeStyle as Qe, createSlots as oe, createCommentVNode as j, withModifiers as Je, reactive as Fe, watch as Ce, isRef as re, Teleport as pe, h as k, createTextVNode as K, watchEffect as Ke } from "vue";
|
|
2
2
|
import { E as qe } from "./empty-placeholder-wf6-BWE8.js";
|
|
3
|
-
import { x as Ge, y as Ze, c as ae, u as se, z as We, a as ce, N as ge, A as Ae, B as $, s as ne, C as Be, D as Ve, v as fe } from "./app-
|
|
3
|
+
import { x as Ge, y as Ze, c as ae, u as se, z as We, a as ce, N as ge, A as Ae, B as $, s as ne, C as Be, D as Ve, v as fe } from "./app-Nk4Y77Qj.js";
|
|
4
4
|
import { useDialogChild as $e, useDialog as be, useProxiedModel as ue, useSnackbar as G, useBreakpoints as _e, components as J } from "@feedmepos/ui-library";
|
|
5
5
|
import { F as Ee, _ as et } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
6
6
|
import { useI18n as Z, useCoreStore as le } from "@feedmepos/mf-common";
|
|
7
|
-
import { _ as tt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as nt, a as st, b as ot, c as at } from "./index-
|
|
9
|
-
import { u as te, a as me } from "./netsuite-
|
|
10
|
-
import { b as lt, a as it } from "./FmMultiselectDialog-
|
|
11
|
-
import { R as rt, a as ut } from "./rules-
|
|
7
|
+
import { _ as tt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xXhG-DmK.js";
|
|
8
|
+
import { u as nt, a as st, b as ot, c as at } from "./index-De0Df7gB.js";
|
|
9
|
+
import { u as te, a as me } from "./netsuite-BImilKq9.js";
|
|
10
|
+
import { b as lt, a as it } from "./FmMultiselectDialog-Zg4QAuZ8.js";
|
|
11
|
+
import { R as rt, a as ut } from "./rules-C08N8B1y.js";
|
|
12
12
|
import { N as Ne, H as Le, b as De } from "./app-uBuHtW8m.js";
|
|
13
|
-
import { u as dt } from "./supplier-
|
|
14
|
-
import { u as ve } from "./vue-i18n-
|
|
15
|
-
import { _ as ct, a as mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { a as he, f as Te } from "./date2-
|
|
17
|
-
import { u as Re } from "./feature-
|
|
13
|
+
import { u as dt } from "./supplier-BjAFZVCS.js";
|
|
14
|
+
import { u as ve } from "./vue-i18n-Da-yf5Lo.js";
|
|
15
|
+
import { _ as ct, a as mt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DIUMW2nw.js";
|
|
16
|
+
import { a as he, f as Te } from "./date2-DD_njicn.js";
|
|
17
|
+
import { u as Re } from "./feature-Coz9xh98.js";
|
|
18
18
|
import { F as Oe } from "./FmDroppableField-J0xUsOTV.js";
|
|
19
|
-
import { r as Me, u as ze } from "./xlsx-
|
|
19
|
+
import { r as Me, u as ze } from "./xlsx-BVMVIxuA.js";
|
|
20
20
|
const ft = "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";
|
|
21
21
|
var je = { exports: {} };
|
|
22
22
|
(function(_, h) {
|
|
23
23
|
(function() {
|
|
24
24
|
var o = {};
|
|
25
25
|
_.exports = o, o.simpleFilter = function(d, s) {
|
|
26
|
-
return s.filter(function(
|
|
27
|
-
return o.test(d,
|
|
26
|
+
return s.filter(function(i) {
|
|
27
|
+
return o.test(d, i);
|
|
28
28
|
});
|
|
29
29
|
}, o.test = function(d, s) {
|
|
30
30
|
return o.match(d, s) !== null;
|
|
31
|
-
}, o.match = function(d, s,
|
|
32
|
-
|
|
33
|
-
var r = 0, t = [], p = s.length, S = 0, I = 0, f =
|
|
34
|
-
d =
|
|
31
|
+
}, o.match = function(d, s, i) {
|
|
32
|
+
i = i || {};
|
|
33
|
+
var r = 0, t = [], p = s.length, S = 0, I = 0, f = i.pre || "", g = i.post || "", y = i.caseSensitive && s || s.toLowerCase(), w;
|
|
34
|
+
d = i.caseSensitive && d || d.toLowerCase();
|
|
35
35
|
for (var C = 0; C < p; C++)
|
|
36
36
|
w = s[C], y[C] === d[r] ? (w = f + w + g, r += 1, I += 1 + I) : I = 0, S += I, t[t.length] = w;
|
|
37
37
|
return r === d.length ? (S = y === d ? 1 / 0 : S, { rendered: t.join(""), score: S }) : null;
|
|
38
|
-
}, o.filter = function(d, s,
|
|
39
|
-
return !s || s.length === 0 ? [] : typeof d != "string" ? s : (
|
|
38
|
+
}, o.filter = function(d, s, i) {
|
|
39
|
+
return !s || s.length === 0 ? [] : typeof d != "string" ? s : (i = i || {}, s.reduce(function(r, t, p, S) {
|
|
40
40
|
var I = t;
|
|
41
|
-
|
|
42
|
-
var f = o.match(d, I,
|
|
41
|
+
i.extract && (I = i.extract(t));
|
|
42
|
+
var f = o.match(d, I, i);
|
|
43
43
|
return f != null && (r[r.length] = {
|
|
44
44
|
string: f.rendered,
|
|
45
45
|
score: f.score,
|
|
@@ -80,8 +80,8 @@ function vt(_, h) {
|
|
|
80
80
|
segments: [{ segment: h, isMatch: !1 }],
|
|
81
81
|
matched: !1
|
|
82
82
|
};
|
|
83
|
-
const d = o.string.toString().replace(/\|\|/g, "").split("|").reduce((s,
|
|
84
|
-
segment:
|
|
83
|
+
const d = o.string.toString().replace(/\|\|/g, "").split("|").reduce((s, i, r) => (s.push({
|
|
84
|
+
segment: i,
|
|
85
85
|
isMatch: r % 2 !== 0
|
|
86
86
|
//e.g. index 1, 3, 5, ...
|
|
87
87
|
}), s), new Array());
|
|
@@ -118,14 +118,14 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
118
118
|
o.emitData(h.value);
|
|
119
119
|
});
|
|
120
120
|
const d = L(""), { t: s } = Z();
|
|
121
|
-
function
|
|
121
|
+
function i(u) {
|
|
122
122
|
return Ie(
|
|
123
123
|
d.value,
|
|
124
124
|
u.sublabel ? [u.label, u.sublabel] : [u.label]
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
function r(u) {
|
|
128
|
-
return
|
|
128
|
+
return i(u) ? !0 : W(u) ? u.children.some(r) : !1;
|
|
129
129
|
}
|
|
130
130
|
function t(u, b) {
|
|
131
131
|
if (!d.value)
|
|
@@ -171,7 +171,7 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
171
171
|
function I(u) {
|
|
172
172
|
if (W(u)) {
|
|
173
173
|
if (r(u)) {
|
|
174
|
-
const b =
|
|
174
|
+
const b = i(u) ? u.children : u.children.filter(r);
|
|
175
175
|
return b.length === 0 ? !1 : b.every(I);
|
|
176
176
|
}
|
|
177
177
|
return u.children.every(I);
|
|
@@ -188,7 +188,7 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
188
188
|
function g(u) {
|
|
189
189
|
if (W(u)) {
|
|
190
190
|
if (r(u)) {
|
|
191
|
-
const b =
|
|
191
|
+
const b = i(u) ? u.children : u.children.filter(r);
|
|
192
192
|
return b.length === 0 ? !1 : b.some(I) && !b.every(I);
|
|
193
193
|
}
|
|
194
194
|
return !1;
|
|
@@ -207,7 +207,7 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
207
207
|
return u;
|
|
208
208
|
if (W(u)) {
|
|
209
209
|
if (r(u)) {
|
|
210
|
-
const B =
|
|
210
|
+
const B = i(u) ? u.children : u.children.filter(r);
|
|
211
211
|
return {
|
|
212
212
|
...u,
|
|
213
213
|
children: u.children.map((T) => B.find((X) => Ze(X.value, T.value)) ? w(T, b) : T)
|
|
@@ -254,9 +254,9 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
254
254
|
return (u, b) => {
|
|
255
255
|
const B = F("FmSearch"), T = F("FmCheckbox"), M = F("FmButton"), X = F("FmListItem"), D = F("FmList");
|
|
256
256
|
return x(), E("div", gt, [
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
l("div", yt, [
|
|
258
|
+
l("div", At, R(V(s)("inventory.formField.itemsSelected", { count: m.value })), 1),
|
|
259
|
+
l("div", bt, [
|
|
260
260
|
A(B, {
|
|
261
261
|
modelValue: d.value,
|
|
262
262
|
"onUpdate:modelValue": b[0] || (b[0] = (z) => d.value = z),
|
|
@@ -288,8 +288,8 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
288
288
|
disabled: z.selectable !== !1 && z.disabled
|
|
289
289
|
}, oe({
|
|
290
290
|
default: N(() => [
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
l("div", xt, [
|
|
292
|
+
l("div", It, [
|
|
293
293
|
(x(!0), E(P, null, ee(V(vt)(d.value, z.label).segments, (U, de) => (x(), E("span", {
|
|
294
294
|
key: de,
|
|
295
295
|
class: q({
|
|
@@ -367,7 +367,7 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
367
367
|
},
|
|
368
368
|
emits: ["update:modifiers"],
|
|
369
369
|
setup(_, { emit: h }) {
|
|
370
|
-
const o = _, d = h, s = be(),
|
|
370
|
+
const o = _, d = h, s = be(), i = O(() => {
|
|
371
371
|
const f = o.groups.flatMap((g) => g.items.map((y) => {
|
|
372
372
|
const w = o.items.find((C) => C._id === y._id);
|
|
373
373
|
return {
|
|
@@ -458,8 +458,8 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
458
458
|
return (f, g) => {
|
|
459
459
|
const y = F("FmButton"), w = F("FmTextField");
|
|
460
460
|
return x(), E("div", wt, [
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
l("div", kt, [
|
|
462
|
+
l("div", Ft, R(V(I)("inventory.integration.apply.addons")), 1),
|
|
463
463
|
A(y, {
|
|
464
464
|
type: "button",
|
|
465
465
|
variant: "plain",
|
|
@@ -469,23 +469,23 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
469
469
|
onClick: g[0] || (g[0] = (C) => S())
|
|
470
470
|
}, null, 8, ["label"])
|
|
471
471
|
]),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
g[1] || (g[1] =
|
|
472
|
+
l("div", null, [
|
|
473
|
+
i.value.length > 0 ? (x(), E("table", Ct, [
|
|
474
|
+
l("tr", Bt, [
|
|
475
|
+
l("th", Vt, R(V(I)("inventory.integration.apply.name")), 1),
|
|
476
|
+
l("th", null, R(V(I)("inventory.integration.apply.code")), 1),
|
|
477
|
+
g[1] || (g[1] = l("th", { class: "w-1" }, " ", -1))
|
|
478
478
|
]),
|
|
479
|
-
(x(!0), E(P, null, ee(
|
|
480
|
-
g[2] || (g[2] =
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
479
|
+
(x(!0), E(P, null, ee(i.value, (C, c) => (x(), E(P, { key: c }, [
|
|
480
|
+
g[2] || (g[2] = l("tr", { class: "block h-8" }, null, -1)),
|
|
481
|
+
l("tr", null, [
|
|
482
|
+
l("td", null, [
|
|
483
|
+
l("div", _t, [
|
|
484
|
+
l("div", Et, R(C.name), 1),
|
|
485
485
|
C.groupName ? (x(), E("div", Nt, R(C.groupName), 1)) : j("", !0)
|
|
486
486
|
])
|
|
487
487
|
]),
|
|
488
|
-
|
|
488
|
+
l("td", null, [
|
|
489
489
|
A(w, {
|
|
490
490
|
disabled: _.loading,
|
|
491
491
|
"model-value": C.code,
|
|
@@ -497,7 +497,7 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
497
497
|
]
|
|
498
498
|
}, null, 8, ["disabled", "model-value", "onUpdate:modelValue", "rules"])
|
|
499
499
|
]),
|
|
500
|
-
|
|
500
|
+
l("td", Lt, [
|
|
501
501
|
A(y, {
|
|
502
502
|
disabled: _.loading,
|
|
503
503
|
type: "button",
|
|
@@ -517,11 +517,11 @@ const gt = { class: "flex flex-col gap-12 h-[350px]" }, yt = { class: "flex item
|
|
|
517
517
|
}
|
|
518
518
|
});
|
|
519
519
|
function Tt(_, h = []) {
|
|
520
|
-
const o = h.map((s) => _.find((
|
|
521
|
-
return Ot(o).reduce((s,
|
|
520
|
+
const o = h.map((s) => _.find((i) => i._id === s)).filter((s) => !!s);
|
|
521
|
+
return Ot(o).reduce((s, i) => (s[i.combinationKey] = i.selectionName.join(" / "), s), {});
|
|
522
522
|
}
|
|
523
523
|
function Rt(_, h, o) {
|
|
524
|
-
const d = o.reduce((
|
|
524
|
+
const d = o.reduce((i, r) => {
|
|
525
525
|
var I, f, g;
|
|
526
526
|
const t = r.category || "", p = Tt(h, (I = r.variant) == null ? void 0 : I.variantGroupIds), S = {
|
|
527
527
|
...r,
|
|
@@ -537,16 +537,16 @@ function Rt(_, h, o) {
|
|
|
537
537
|
})
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
|
-
return
|
|
540
|
+
return i[t] = i[t] ? [...i[t], S] : [S], i;
|
|
541
541
|
}, {}), s = Object.values(d)[0];
|
|
542
|
-
return _.length === 0 && s ? s.map((
|
|
543
|
-
id:
|
|
544
|
-
name:
|
|
545
|
-
items: d[
|
|
546
|
-
})) || [] : _.map((
|
|
547
|
-
id:
|
|
548
|
-
name:
|
|
549
|
-
items: d[
|
|
542
|
+
return _.length === 0 && s ? s.map((i) => ({
|
|
543
|
+
id: i._id,
|
|
544
|
+
name: i.name ?? "",
|
|
545
|
+
items: d[i._id || ""] || []
|
|
546
|
+
})) || [] : _.map((i) => ({
|
|
547
|
+
id: i._id,
|
|
548
|
+
name: i.name ?? "",
|
|
549
|
+
items: d[i._id || ""] || []
|
|
550
550
|
}));
|
|
551
551
|
}
|
|
552
552
|
function Xe(_, h) {
|
|
@@ -609,7 +609,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
609
609
|
},
|
|
610
610
|
emits: ["update:bindings"],
|
|
611
611
|
setup(_, { emit: h }) {
|
|
612
|
-
const o = _, d = h, s = be(),
|
|
612
|
+
const o = _, d = h, s = be(), i = O(() => o.isAddon ? "Addons" : "Products"), r = O(() => o.isAddon ? [] : o.categories), t = O(
|
|
613
613
|
() => Rt(r.value, o.variants, o.menus)
|
|
614
614
|
), p = O(() => {
|
|
615
615
|
if (o.isAddon)
|
|
@@ -759,7 +759,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
759
759
|
modelValue: e
|
|
760
760
|
};
|
|
761
761
|
s.open({
|
|
762
|
-
title: `Select ${
|
|
762
|
+
title: `Select ${i.value}`,
|
|
763
763
|
contentComponent: He,
|
|
764
764
|
contentComponentProps: n,
|
|
765
765
|
primaryActions: {
|
|
@@ -775,8 +775,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
775
775
|
return (e, n) => {
|
|
776
776
|
const v = F("FmButton"), m = F("FmTextField");
|
|
777
777
|
return x(), E("div", Mt, [
|
|
778
|
-
|
|
779
|
-
|
|
778
|
+
l("div", zt, [
|
|
779
|
+
l("div", jt, R(_.isAddon ? V(c)("inventory.integration.apply.addons") : V(c)("inventory.integration.apply.products")), 1),
|
|
780
780
|
A(v, {
|
|
781
781
|
type: "button",
|
|
782
782
|
variant: "plain",
|
|
@@ -786,26 +786,26 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
786
786
|
onClick: n[0] || (n[0] = (a) => C())
|
|
787
787
|
}, null, 8, ["label"])
|
|
788
788
|
]),
|
|
789
|
-
|
|
789
|
+
l("div", null, [
|
|
790
790
|
p.value.length > 0 ? (x(), E("table", Ut, [
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
n[1] || (n[1] =
|
|
791
|
+
l("thead", null, [
|
|
792
|
+
l("tr", Ht, [
|
|
793
|
+
l("th", Xt, R(V(c)("inventory.integration.apply.name")), 1),
|
|
794
|
+
l("th", null, R(V(c)("inventory.integration.apply.code")), 1),
|
|
795
|
+
n[1] || (n[1] = l("th", { class: "w-1" }, " ", -1))
|
|
796
796
|
])
|
|
797
797
|
]),
|
|
798
|
-
|
|
798
|
+
l("tbody", null, [
|
|
799
799
|
(x(!0), E(P, null, ee(p.value, (a, u) => (x(), E(P, { key: u }, [
|
|
800
|
-
n[2] || (n[2] =
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
800
|
+
n[2] || (n[2] = l("tr", { class: "block h-8" }, null, -1)),
|
|
801
|
+
l("tr", null, [
|
|
802
|
+
l("td", null, [
|
|
803
|
+
l("div", Yt, [
|
|
804
|
+
l("div", Pt, R(a.itemCode) + " " + R(a.name), 1),
|
|
805
805
|
a.variantName ? (x(), E("div", Qt, R(a.variantName), 1)) : j("", !0)
|
|
806
806
|
])
|
|
807
807
|
]),
|
|
808
|
-
|
|
808
|
+
l("td", null, [
|
|
809
809
|
A(m, {
|
|
810
810
|
"model-value": a.code,
|
|
811
811
|
"onUpdate:modelValue": [(b) => a.code = b, (b) => I(a, b)],
|
|
@@ -816,7 +816,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
816
816
|
]
|
|
817
817
|
}, null, 8, ["model-value", "onUpdate:modelValue", "rules"])
|
|
818
818
|
]),
|
|
819
|
-
|
|
819
|
+
l("td", Jt, [
|
|
820
820
|
A(v, {
|
|
821
821
|
type: "button",
|
|
822
822
|
variant: "tertiary",
|
|
@@ -853,10 +853,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
853
853
|
for (const f of Object.keys(o.setting))
|
|
854
854
|
s[f] = o.setting[f];
|
|
855
855
|
});
|
|
856
|
-
const
|
|
856
|
+
const i = L(), r = ue(o, "show");
|
|
857
857
|
function t() {
|
|
858
858
|
var I, f;
|
|
859
|
-
(f = (I =
|
|
859
|
+
(f = (I = i.value) == null ? void 0 : I.validateInputs) == null || f.call(I);
|
|
860
860
|
}
|
|
861
861
|
function p() {
|
|
862
862
|
d("update:setting", ae(s)), d("submit");
|
|
@@ -873,13 +873,13 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
873
873
|
"max-width": 500
|
|
874
874
|
}, {
|
|
875
875
|
default: N(() => [
|
|
876
|
-
|
|
877
|
-
|
|
876
|
+
l("div", Kt, [
|
|
877
|
+
l("div", null, [
|
|
878
878
|
A(g, { label: "Menu v3" })
|
|
879
879
|
]),
|
|
880
880
|
A(y, {
|
|
881
881
|
ref_key: "formRef",
|
|
882
|
-
ref:
|
|
882
|
+
ref: i,
|
|
883
883
|
onValidationSuccess: f[2] || (f[2] = (c) => p())
|
|
884
884
|
}, {
|
|
885
885
|
default: N(() => [
|
|
@@ -891,7 +891,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
891
891
|
"onUpdate:bindings": f[0] || (f[0] = (c) => s.bindings = c)
|
|
892
892
|
}, null, 8, ["bindings", "categories", "variants", "menus"]),
|
|
893
893
|
A(Dt, {
|
|
894
|
-
form:
|
|
894
|
+
form: i.value,
|
|
895
895
|
modifiers: s.modifiers ?? [],
|
|
896
896
|
groups: I.groups ?? [],
|
|
897
897
|
items: I.menus ?? [],
|
|
@@ -933,7 +933,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
933
933
|
for (const e of Object.keys(o.setting))
|
|
934
934
|
s[e] = o.setting[e];
|
|
935
935
|
});
|
|
936
|
-
const
|
|
936
|
+
const i = O(() => o.menus.filter((c) => !(c != null && c.category))), r = O(() => s.bindings.filter((c) => {
|
|
937
937
|
const e = o.menus.find((n) => n._id === c.productId);
|
|
938
938
|
return e ? !(e != null && e.category) : !1;
|
|
939
939
|
})), t = O(() => o.menus.filter((c) => (c == null ? void 0 : c.category) !== null)), p = O(() => s.bindings.filter((c) => {
|
|
@@ -966,8 +966,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
966
966
|
"max-width": 500
|
|
967
967
|
}, {
|
|
968
968
|
default: N(() => [
|
|
969
|
-
|
|
970
|
-
|
|
969
|
+
l("div", Gt, [
|
|
970
|
+
l("div", null, [
|
|
971
971
|
A(n, { label: "Menu v4" })
|
|
972
972
|
]),
|
|
973
973
|
A(v, {
|
|
@@ -988,7 +988,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
988
988
|
categories: [],
|
|
989
989
|
variants: c.variants,
|
|
990
990
|
bindings: r.value,
|
|
991
|
-
menus:
|
|
991
|
+
menus: i.value,
|
|
992
992
|
"onUpdate:bindings": e[1] || (e[1] = (u) => I(u))
|
|
993
993
|
}, null, 8, ["variants", "bindings", "menus"])
|
|
994
994
|
]),
|
|
@@ -1011,18 +1011,18 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1011
1011
|
}), Wt = { key: 0 }, $t = { class: "flex justify-center" }, en = ["src"], tn = { class: "flex flex-col items-center gap-2" }, nn = { class: "text-lg font-bold" }, sn = { class: "text-fm-color-neutral-gray-300" }, on = { key: 0 }, an = /* @__PURE__ */ Y({
|
|
1012
1012
|
__name: "FoodMarketHub",
|
|
1013
1013
|
setup(_) {
|
|
1014
|
-
const h = le(), o = G(), d = se(), s = L(!1),
|
|
1014
|
+
const h = le(), o = G(), d = se(), s = L(!1), i = nt(), r = O(() => i.state.menu ?? []), t = O(() => i.state.group ?? []), p = O(() => i.state.variants ?? []), S = O(() => i.state.categories ?? []), I = We(), f = O(() => {
|
|
1015
1015
|
var v;
|
|
1016
1016
|
return (v = h.currentBusiness.value) == null ? void 0 : v.menuVersion;
|
|
1017
1017
|
});
|
|
1018
|
-
d.watchLocation(
|
|
1018
|
+
d.watchLocation(i.init);
|
|
1019
1019
|
const g = L(!1);
|
|
1020
1020
|
async function y() {
|
|
1021
1021
|
g.value = !0;
|
|
1022
1022
|
}
|
|
1023
1023
|
const { breakpoints: w } = _e(), C = O(() => w.value.xs || w.value.sm), c = O(() => C.value);
|
|
1024
1024
|
async function e() {
|
|
1025
|
-
const v =
|
|
1025
|
+
const v = i.state.setting;
|
|
1026
1026
|
if (v) {
|
|
1027
1027
|
s.value = !0;
|
|
1028
1028
|
try {
|
|
@@ -1030,7 +1030,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1030
1030
|
title: "Success",
|
|
1031
1031
|
message: "Your changes has been saved",
|
|
1032
1032
|
type: "success"
|
|
1033
|
-
}), g.value = !1, await
|
|
1033
|
+
}), g.value = !1, await i.init();
|
|
1034
1034
|
return;
|
|
1035
1035
|
} catch (m) {
|
|
1036
1036
|
o.open({
|
|
@@ -1046,7 +1046,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1046
1046
|
const { t: n } = Z();
|
|
1047
1047
|
return (v, m) => {
|
|
1048
1048
|
const a = F("FmCardSection"), u = F("FmCard");
|
|
1049
|
-
return V(
|
|
1049
|
+
return V(i).isEnabled && !V(i).isBusinessLocation ? (x(), E("div", Wt, [
|
|
1050
1050
|
A(u, {
|
|
1051
1051
|
class: q({
|
|
1052
1052
|
"w-full": c.value,
|
|
@@ -1061,15 +1061,15 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1061
1061
|
default: N(() => [
|
|
1062
1062
|
A(a, null, {
|
|
1063
1063
|
default: N(() => [
|
|
1064
|
-
|
|
1065
|
-
|
|
1064
|
+
l("div", $t, [
|
|
1065
|
+
l("img", {
|
|
1066
1066
|
src: V(ft),
|
|
1067
1067
|
alt: "Food Market Hub"
|
|
1068
1068
|
}, null, 8, en)
|
|
1069
1069
|
]),
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1070
|
+
l("div", tn, [
|
|
1071
|
+
l("div", nn, R(V(n)("inventory.integration.fmh.title")), 1),
|
|
1072
|
+
l("div", sn, R(V(n)("inventory.integration.fmh.description")), 1)
|
|
1073
1073
|
])
|
|
1074
1074
|
]),
|
|
1075
1075
|
_: 1
|
|
@@ -1077,15 +1077,15 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1077
1077
|
]),
|
|
1078
1078
|
_: 1
|
|
1079
1079
|
}, 8, ["class"]),
|
|
1080
|
-
V(
|
|
1080
|
+
V(i).state.setting ? (x(), E("div", on, [
|
|
1081
1081
|
(x(), H(pe, { to: "body" }, [
|
|
1082
1082
|
f.value === "v3" ? (x(), H(qt, {
|
|
1083
1083
|
key: 0,
|
|
1084
1084
|
menus: r.value,
|
|
1085
1085
|
variants: p.value,
|
|
1086
1086
|
categories: S.value,
|
|
1087
|
-
setting: V(
|
|
1088
|
-
"onUpdate:setting": m[1] || (m[1] = (b) => V(
|
|
1087
|
+
setting: V(i).state.setting,
|
|
1088
|
+
"onUpdate:setting": m[1] || (m[1] = (b) => V(i).state.setting = b),
|
|
1089
1089
|
show: g.value,
|
|
1090
1090
|
"onUpdate:show": m[2] || (m[2] = (b) => g.value = b),
|
|
1091
1091
|
groups: t.value,
|
|
@@ -1096,8 +1096,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1096
1096
|
menus: r.value,
|
|
1097
1097
|
variants: p.value,
|
|
1098
1098
|
categories: S.value,
|
|
1099
|
-
setting: V(
|
|
1100
|
-
"onUpdate:setting": m[4] || (m[4] = (b) => V(
|
|
1099
|
+
setting: V(i).state.setting,
|
|
1100
|
+
"onUpdate:setting": m[4] || (m[4] = (b) => V(i).state.setting = b),
|
|
1101
1101
|
show: g.value,
|
|
1102
1102
|
"onUpdate:show": m[5] || (m[5] = (b) => g.value = b),
|
|
1103
1103
|
groups: t.value,
|
|
@@ -1127,12 +1127,12 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1127
1127
|
},
|
|
1128
1128
|
emits: ["update:modelValue"],
|
|
1129
1129
|
setup(_, { emit: h }) {
|
|
1130
|
-
const o = _, d = h, s = L(""),
|
|
1130
|
+
const o = _, d = h, s = L(""), i = O(
|
|
1131
1131
|
() => new lt(
|
|
1132
1132
|
o.items,
|
|
1133
1133
|
(t) => [t.label ?? "", t.sublabel ?? "", ...t.value[o.searchTarget]].filter((p) => p)
|
|
1134
1134
|
)
|
|
1135
|
-
), r = O(() =>
|
|
1135
|
+
), r = O(() => i.value.search(s.value));
|
|
1136
1136
|
return (t, p) => {
|
|
1137
1137
|
const S = F("FmLabel"), I = F("FmField"), f = F("FmIcon"), g = F("FmTextField"), y = F("FmMenuItem"), w = F("FmMenu"), C = F("FmFormGroup");
|
|
1138
1138
|
return x(), H(C, {
|
|
@@ -1161,7 +1161,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1161
1161
|
}, 1032, ["class", "invalid"])
|
|
1162
1162
|
]),
|
|
1163
1163
|
default: N(() => [
|
|
1164
|
-
|
|
1164
|
+
l("div", dn, [
|
|
1165
1165
|
A(g, {
|
|
1166
1166
|
modelValue: s.value,
|
|
1167
1167
|
"onUpdate:modelValue": p[1] || (p[1] = (e) => s.value = e),
|
|
@@ -1184,7 +1184,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1184
1184
|
key: "0"
|
|
1185
1185
|
} : void 0
|
|
1186
1186
|
]), 1032, ["modelValue"]),
|
|
1187
|
-
|
|
1187
|
+
l("div", cn, [
|
|
1188
1188
|
(x(!0), E(P, null, ee(r.value, (e, n) => {
|
|
1189
1189
|
var v, m;
|
|
1190
1190
|
return x(), H(y, {
|
|
@@ -1236,13 +1236,13 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1236
1236
|
emits: ["update:modelValue"],
|
|
1237
1237
|
setup(_, { emit: h }) {
|
|
1238
1238
|
const o = _, d = O(() => o.modelValue), s = h;
|
|
1239
|
-
return (
|
|
1239
|
+
return (i, r) => {
|
|
1240
1240
|
const t = F("FmButton"), p = F("FmIcon");
|
|
1241
1241
|
return x(), E("div", mn, [
|
|
1242
|
-
|
|
1242
|
+
l("div", fn, [
|
|
1243
1243
|
A(Ye, {
|
|
1244
1244
|
placeholder: "Select NetSuite Location",
|
|
1245
|
-
items:
|
|
1245
|
+
items: i.nsLocationOptions,
|
|
1246
1246
|
searchTarget: "name",
|
|
1247
1247
|
"model-value": d.value,
|
|
1248
1248
|
"onUpdate:modelValue": r[0] || (r[0] = (S) => s("update:modelValue", S))
|
|
@@ -1259,7 +1259,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1259
1259
|
}))
|
|
1260
1260
|
})) : j("", !0)
|
|
1261
1261
|
]),
|
|
1262
|
-
|
|
1262
|
+
i.isDuplicate ? (x(), E("div", pn, " NetSuite location being used by another FeedMe location. ")) : j("", !0),
|
|
1263
1263
|
d.value.netsuiteId ? (x(), E("div", vn, [
|
|
1264
1264
|
A(p, {
|
|
1265
1265
|
name: "cloud",
|
|
@@ -1268,11 +1268,11 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1268
1268
|
class: "mr-2",
|
|
1269
1269
|
outline: ""
|
|
1270
1270
|
}),
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1271
|
+
l("div", gn, [
|
|
1272
|
+
l("span", yn, R(d.value.name), 1),
|
|
1273
|
+
l("span", An, "ID: " + R(d.value.netsuiteId), 1),
|
|
1274
|
+
l("span", bn, "Subsidiary: " + R(d.value.subsidiaryName), 1),
|
|
1275
|
+
l("span", hn, "Inactive: " + R(d.value.isinactive ? "Yes" : "No"), 1)
|
|
1276
1276
|
])
|
|
1277
1277
|
])) : j("", !0)
|
|
1278
1278
|
]);
|
|
@@ -1347,7 +1347,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1347
1347
|
});
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
|
-
],
|
|
1350
|
+
], i = _, r = h, t = L({}), p = L(), S = L(""), I = O(() => i.nsLocationsNotBeingUsed.map((y) => ({
|
|
1351
1351
|
label: y.name,
|
|
1352
1352
|
value: y
|
|
1353
1353
|
}))), f = O(() => Object.values(t.value).length === 0 || Object.values(t.value).some(
|
|
@@ -1377,7 +1377,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1377
1377
|
"max-width": "900px"
|
|
1378
1378
|
}, {
|
|
1379
1379
|
"dialog-header": N(() => w[3] || (w[3] = [
|
|
1380
|
-
|
|
1380
|
+
l("div", null, "Add locations", -1)
|
|
1381
1381
|
])),
|
|
1382
1382
|
"dialog-footer": N(() => [
|
|
1383
1383
|
A(e, { class: "sm:hidden xs:hidden" }),
|
|
@@ -1400,7 +1400,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1400
1400
|
A(C, {
|
|
1401
1401
|
modelValue: p.value,
|
|
1402
1402
|
"onUpdate:modelValue": w[0] || (w[0] = (m) => p.value = m),
|
|
1403
|
-
"row-data":
|
|
1403
|
+
"row-data": i.fmLocationNotYetConfigured,
|
|
1404
1404
|
"column-defs": s,
|
|
1405
1405
|
"search-value": S.value,
|
|
1406
1406
|
"shrink-at": !1
|
|
@@ -1416,7 +1416,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1416
1416
|
}), Sn = { class: "p-8 flex items-center justify-between" }, wn = { class: "flex gap-4" }, kn = /* @__PURE__ */ Y({
|
|
1417
1417
|
__name: "LocationsTab",
|
|
1418
1418
|
setup(_) {
|
|
1419
|
-
const h = se(), o = te(), d = G(), s = L(!1),
|
|
1419
|
+
const h = se(), o = te(), d = G(), s = L(!1), i = L(), r = L(""), t = L(null), p = L([]), S = L(null), I = [
|
|
1420
1420
|
{
|
|
1421
1421
|
key: "type",
|
|
1422
1422
|
type: "string",
|
|
@@ -1522,8 +1522,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1522
1522
|
return (c, e) => {
|
|
1523
1523
|
const n = F("FmSearch"), v = F("FmButton"), m = F("FmTable");
|
|
1524
1524
|
return x(), E("div", null, [
|
|
1525
|
-
|
|
1526
|
-
|
|
1525
|
+
l("div", Sn, [
|
|
1526
|
+
l("div", wn, [
|
|
1527
1527
|
A(n, {
|
|
1528
1528
|
placeholder: "Search by Location",
|
|
1529
1529
|
class: "w-[300px]",
|
|
@@ -1542,8 +1542,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1542
1542
|
})
|
|
1543
1543
|
]),
|
|
1544
1544
|
A(m, {
|
|
1545
|
-
modelValue:
|
|
1546
|
-
"onUpdate:modelValue": e[2] || (e[2] = (a) =>
|
|
1545
|
+
modelValue: i.value,
|
|
1546
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => i.value = a),
|
|
1547
1547
|
"row-data": f.value,
|
|
1548
1548
|
"column-defs": g,
|
|
1549
1549
|
"shrink-at": !1,
|
|
@@ -1585,13 +1585,13 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1585
1585
|
emits: ["update:modelValue"],
|
|
1586
1586
|
setup(_, { emit: h }) {
|
|
1587
1587
|
const o = _, d = O(() => o.modelValue), s = h;
|
|
1588
|
-
return (
|
|
1588
|
+
return (i, r) => {
|
|
1589
1589
|
const t = F("FmButton"), p = F("FmIcon");
|
|
1590
1590
|
return x(), E("div", Fn, [
|
|
1591
|
-
|
|
1591
|
+
l("div", Cn, [
|
|
1592
1592
|
A(Ye, {
|
|
1593
1593
|
placeholder: "Select NetSuite Vendor",
|
|
1594
|
-
items:
|
|
1594
|
+
items: i.nsVendorOptions,
|
|
1595
1595
|
searchTarget: "name",
|
|
1596
1596
|
"model-value": d.value,
|
|
1597
1597
|
"onUpdate:modelValue": r[0] || (r[0] = (S) => s("update:modelValue", S))
|
|
@@ -1608,7 +1608,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1608
1608
|
}))
|
|
1609
1609
|
})) : j("", !0)
|
|
1610
1610
|
]),
|
|
1611
|
-
|
|
1611
|
+
i.isDuplicate ? (x(), E("div", Bn, " NetSuite vendor being used by another FeedMe supplier. ")) : j("", !0),
|
|
1612
1612
|
d.value.netsuiteId ? (x(), E("div", Vn, [
|
|
1613
1613
|
A(p, {
|
|
1614
1614
|
name: "cloud",
|
|
@@ -1617,10 +1617,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1617
1617
|
class: "mr-2",
|
|
1618
1618
|
outline: ""
|
|
1619
1619
|
}),
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1620
|
+
l("div", _n, [
|
|
1621
|
+
l("span", En, R(d.value.name), 1),
|
|
1622
|
+
l("span", Nn, "ID: " + R(d.value.netsuiteId), 1),
|
|
1623
|
+
l("span", Ln, "Subsidiary: " + R(d.value.subsidiaryName), 1)
|
|
1624
1624
|
])
|
|
1625
1625
|
])) : j("", !0)
|
|
1626
1626
|
]);
|
|
@@ -1702,7 +1702,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1702
1702
|
});
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
],
|
|
1705
|
+
], i = _, r = h, t = L({}), p = L(), S = L(""), I = O(() => i.nsVendorsNotBeingUsed.filter((y) => y.name).map((y) => ({
|
|
1706
1706
|
label: y.name,
|
|
1707
1707
|
value: y
|
|
1708
1708
|
}))), f = O(() => Object.values(t.value).length === 0 || Object.values(t.value).some(
|
|
@@ -1732,7 +1732,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1732
1732
|
"max-width": "900px"
|
|
1733
1733
|
}, {
|
|
1734
1734
|
"dialog-header": N(() => w[3] || (w[3] = [
|
|
1735
|
-
|
|
1735
|
+
l("div", null, "Add vendors", -1)
|
|
1736
1736
|
])),
|
|
1737
1737
|
"dialog-footer": N(() => [
|
|
1738
1738
|
A(n, { class: "sm:hidden xs:hidden" }),
|
|
@@ -1745,9 +1745,9 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1745
1745
|
}, null, 8, ["disabled"])
|
|
1746
1746
|
]),
|
|
1747
1747
|
default: N(() => [
|
|
1748
|
-
|
|
1748
|
+
i.nsVendorsLoading ? (x(), E("div", Tn, [
|
|
1749
1749
|
A(C, { size: "lg" }),
|
|
1750
|
-
w[4] || (w[4] =
|
|
1750
|
+
w[4] || (w[4] = l("span", { class: "ml-3 text-gray-500" }, "Loading NetSuite vendors...", -1))
|
|
1751
1751
|
])) : (x(), H(e, {
|
|
1752
1752
|
key: 1,
|
|
1753
1753
|
ref: "formRef",
|
|
@@ -1759,7 +1759,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1759
1759
|
A(c, {
|
|
1760
1760
|
modelValue: p.value,
|
|
1761
1761
|
"onUpdate:modelValue": w[0] || (w[0] = (a) => p.value = a),
|
|
1762
|
-
"row-data":
|
|
1762
|
+
"row-data": i.fmSuppliersNotYetConfigured,
|
|
1763
1763
|
"column-defs": s,
|
|
1764
1764
|
"search-value": S.value,
|
|
1765
1765
|
"shrink-at": !1
|
|
@@ -1781,7 +1781,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1781
1781
|
}, Un = /* @__PURE__ */ Y({
|
|
1782
1782
|
__name: "VendorsTab",
|
|
1783
1783
|
setup(_) {
|
|
1784
|
-
const h = dt(), o = te(), d = G(), s = L(""),
|
|
1784
|
+
const h = dt(), o = te(), d = G(), s = L(""), i = L(!1), r = L([]), t = L(!1), p = L(null), S = L(null);
|
|
1785
1785
|
ie(async () => {
|
|
1786
1786
|
if (h.suppliers.length === 0)
|
|
1787
1787
|
try {
|
|
@@ -1868,19 +1868,19 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1868
1868
|
(e) => e.netSuiteId === c.netsuiteId
|
|
1869
1869
|
)
|
|
1870
1870
|
)), w = () => {
|
|
1871
|
-
|
|
1871
|
+
i.value = !0;
|
|
1872
1872
|
}, C = O(() => !t.value && !p.value && r.value.length > 0);
|
|
1873
1873
|
return (c, e) => {
|
|
1874
1874
|
const n = F("FmSearch"), v = F("FmButton"), m = F("FmTable");
|
|
1875
1875
|
return x(), E("div", null, [
|
|
1876
|
-
|
|
1876
|
+
l("div", On, [
|
|
1877
1877
|
A(n, {
|
|
1878
1878
|
placeholder: "Search by Vendor",
|
|
1879
1879
|
class: "w-[300px]",
|
|
1880
1880
|
modelValue: s.value,
|
|
1881
1881
|
"onUpdate:modelValue": e[0] || (e[0] = (a) => s.value = a)
|
|
1882
1882
|
}, null, 8, ["modelValue"]),
|
|
1883
|
-
|
|
1883
|
+
l("div", Mn, [
|
|
1884
1884
|
t.value ? (x(), E("span", zn, "Loading vendors...")) : p.value ? (x(), E("span", jn, R(p.value), 1)) : j("", !0),
|
|
1885
1885
|
A(v, {
|
|
1886
1886
|
label: "Add vendor",
|
|
@@ -1897,10 +1897,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1897
1897
|
"search-value": s.value
|
|
1898
1898
|
}, null, 8, ["row-data", "search-value"]),
|
|
1899
1899
|
A(Rn, {
|
|
1900
|
-
"show-dialog":
|
|
1900
|
+
"show-dialog": i.value,
|
|
1901
1901
|
"onUpdate:showDialog": [
|
|
1902
|
-
e[1] || (e[1] = (a) =>
|
|
1903
|
-
e[2] || (e[2] = (a) =>
|
|
1902
|
+
e[1] || (e[1] = (a) => i.value = a),
|
|
1903
|
+
e[2] || (e[2] = (a) => i.value = a)
|
|
1904
1904
|
],
|
|
1905
1905
|
formRef: S.value,
|
|
1906
1906
|
fmSuppliersNotYetConfigured: g.value,
|
|
@@ -1913,7 +1913,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1913
1913
|
}), Hn = { class: "p-8 flex flex-col gap-4" }, Xn = { class: "flex gap-4 items-center" }, Yn = /* @__PURE__ */ Y({
|
|
1914
1914
|
__name: "ItemsTab",
|
|
1915
1915
|
setup(_) {
|
|
1916
|
-
const h = ce(), o = te(), d = me(), s = G(), { t:
|
|
1916
|
+
const h = ce(), o = te(), d = me(), s = G(), { t: i } = Z();
|
|
1917
1917
|
ie(async () => {
|
|
1918
1918
|
o.state.isReady && o.state.itemReplicas.length === 0 && await o.getAllItemReplicas();
|
|
1919
1919
|
});
|
|
@@ -1932,7 +1932,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1932
1932
|
try {
|
|
1933
1933
|
await d.publishItemsToInventory(), s.open({
|
|
1934
1934
|
title: "Success",
|
|
1935
|
-
message:
|
|
1935
|
+
message: i("Items published to inventory successfully."),
|
|
1936
1936
|
type: "success"
|
|
1937
1937
|
}), await Promise.all([o.getAllItemReplicas(), h.fetchInventory()]);
|
|
1938
1938
|
} catch (e) {
|
|
@@ -2084,8 +2084,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2084
2084
|
return (e, n) => {
|
|
2085
2085
|
const v = F("FmSearch"), m = F("FmButton"), a = F("FmTable");
|
|
2086
2086
|
return x(), E("div", null, [
|
|
2087
|
-
|
|
2088
|
-
|
|
2087
|
+
l("div", Hn, [
|
|
2088
|
+
l("div", Xn, [
|
|
2089
2089
|
A(v, {
|
|
2090
2090
|
placeholder: "Search by Item",
|
|
2091
2091
|
class: "w-[300px]",
|
|
@@ -2121,7 +2121,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2121
2121
|
}), Pn = { class: "p-8" }, Qn = /* @__PURE__ */ Y({
|
|
2122
2122
|
__name: "UnitTypesTab",
|
|
2123
2123
|
setup(_) {
|
|
2124
|
-
const h = ce(), o = te(), d = L(), s = L(""),
|
|
2124
|
+
const h = ce(), o = te(), d = L(), s = L(""), i = O(() => o.state.setting.units), r = [
|
|
2125
2125
|
{
|
|
2126
2126
|
id: "unit",
|
|
2127
2127
|
header: () => "FeedMe Unit",
|
|
@@ -2190,7 +2190,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2190
2190
|
return (t, p) => {
|
|
2191
2191
|
const S = F("FmSearch"), I = F("FmTable");
|
|
2192
2192
|
return x(), E("div", null, [
|
|
2193
|
-
|
|
2193
|
+
l("div", Pn, [
|
|
2194
2194
|
A(S, {
|
|
2195
2195
|
placeholder: "Search by Unit Type",
|
|
2196
2196
|
class: "w-[300px]",
|
|
@@ -2201,7 +2201,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2201
2201
|
A(I, {
|
|
2202
2202
|
modelValue: d.value,
|
|
2203
2203
|
"onUpdate:modelValue": p[1] || (p[1] = (f) => d.value = f),
|
|
2204
|
-
"row-data":
|
|
2204
|
+
"row-data": i.value,
|
|
2205
2205
|
"column-defs": r,
|
|
2206
2206
|
"shrink-at": !1,
|
|
2207
2207
|
"search-value": s.value,
|
|
@@ -2221,7 +2221,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2221
2221
|
},
|
|
2222
2222
|
emits: ["update:show", "update:loading"],
|
|
2223
2223
|
setup(_, { emit: h }) {
|
|
2224
|
-
const o = le(), d = te(), s = _,
|
|
2224
|
+
const o = le(), d = te(), s = _, i = h, r = ue(s, "show"), t = L(
|
|
2225
2225
|
"locations"
|
|
2226
2226
|
/* LOCATIONS */
|
|
2227
2227
|
), p = [
|
|
@@ -2256,20 +2256,20 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2256
2256
|
var n;
|
|
2257
2257
|
return [
|
|
2258
2258
|
(n = V(o).sessionUser.value) != null && n.role.isAdmin ? (x(), E("div", Kn, [
|
|
2259
|
-
y[4] || (y[4] =
|
|
2260
|
-
|
|
2259
|
+
y[4] || (y[4] = l("div", { class: "text-sm" }, " This integration keeps your FeedMe system and NetSuite in sync for the following modules: ", -1)),
|
|
2260
|
+
l("div", qn, [
|
|
2261
2261
|
(x(), E(P, null, ee(f, (v) => A(w, {
|
|
2262
2262
|
key: v,
|
|
2263
2263
|
label: v,
|
|
2264
2264
|
compact: ""
|
|
2265
2265
|
}, null, 8, ["label"])), 64))
|
|
2266
2266
|
]),
|
|
2267
|
-
y[5] || (y[5] =
|
|
2268
|
-
|
|
2269
|
-
y[3] || (y[3] =
|
|
2270
|
-
|
|
2267
|
+
y[5] || (y[5] = l("div", { class: "text-xs mt-2" }, " Changes made in FeedMe or NetSuite will be reflected in both systems, ensuring data consistency and streamlined operations. ", -1)),
|
|
2268
|
+
l("div", Gn, [
|
|
2269
|
+
y[3] || (y[3] = l("span", null, "NetSuite Last Sync:", -1)),
|
|
2270
|
+
l("span", Zn, R(I.value), 1)
|
|
2271
2271
|
]),
|
|
2272
|
-
y[6] || (y[6] =
|
|
2272
|
+
y[6] || (y[6] = l("hr", { class: "my-3" }, null, -1)),
|
|
2273
2273
|
A(C, {
|
|
2274
2274
|
"model-value": t.value,
|
|
2275
2275
|
"onUpdate:modelValue": y[0] || (y[0] = (v) => t.value = v),
|
|
@@ -2283,11 +2283,11 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2283
2283
|
];
|
|
2284
2284
|
}),
|
|
2285
2285
|
"side-sheet-footer": N(() => [
|
|
2286
|
-
|
|
2286
|
+
l("div", Wn, [
|
|
2287
2287
|
A(c, {
|
|
2288
2288
|
variant: "tertiary",
|
|
2289
2289
|
label: V(S)("common.close"),
|
|
2290
|
-
onClick: y[1] || (y[1] = (n) =>
|
|
2290
|
+
onClick: y[1] || (y[1] = (n) => i("update:show", !1))
|
|
2291
2291
|
}, null, 8, ["label"])
|
|
2292
2292
|
])
|
|
2293
2293
|
]),
|
|
@@ -2310,11 +2310,11 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2310
2310
|
accessorKey: "code",
|
|
2311
2311
|
size: 200,
|
|
2312
2312
|
cell(s) {
|
|
2313
|
-
const
|
|
2313
|
+
const i = s.row.original;
|
|
2314
2314
|
return k(
|
|
2315
2315
|
J.FmTooltip,
|
|
2316
2316
|
{
|
|
2317
|
-
content:
|
|
2317
|
+
content: i.code,
|
|
2318
2318
|
placement: "top",
|
|
2319
2319
|
variant: "plain",
|
|
2320
2320
|
zIndex: 50
|
|
@@ -2324,7 +2324,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2324
2324
|
{
|
|
2325
2325
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
2326
2326
|
},
|
|
2327
|
-
|
|
2327
|
+
i.code
|
|
2328
2328
|
)
|
|
2329
2329
|
);
|
|
2330
2330
|
},
|
|
@@ -2335,11 +2335,11 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2335
2335
|
header: () => h("inventory.transfer.form.items.table.Name"),
|
|
2336
2336
|
minSize: 300,
|
|
2337
2337
|
cell(s) {
|
|
2338
|
-
const
|
|
2338
|
+
const i = s.row.original;
|
|
2339
2339
|
return k(
|
|
2340
2340
|
J.FmTooltip,
|
|
2341
2341
|
{
|
|
2342
|
-
content:
|
|
2342
|
+
content: i.name,
|
|
2343
2343
|
placement: "top",
|
|
2344
2344
|
variant: "plain",
|
|
2345
2345
|
zIndex: 50
|
|
@@ -2349,7 +2349,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2349
2349
|
{
|
|
2350
2350
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
2351
2351
|
},
|
|
2352
|
-
|
|
2352
|
+
i.name
|
|
2353
2353
|
)
|
|
2354
2354
|
);
|
|
2355
2355
|
},
|
|
@@ -2360,21 +2360,21 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2360
2360
|
header: () => h("inventory.transfer.form.items.table.Amount"),
|
|
2361
2361
|
minSize: 200,
|
|
2362
2362
|
cell(s) {
|
|
2363
|
-
const
|
|
2363
|
+
const i = s.row.original, r = s.row.index;
|
|
2364
2364
|
return k(ct, {
|
|
2365
2365
|
style: {
|
|
2366
2366
|
flex: "1 1 0%"
|
|
2367
2367
|
},
|
|
2368
2368
|
modelValue: {
|
|
2369
|
-
amount:
|
|
2370
|
-
measurement:
|
|
2369
|
+
amount: i.quantity ?? { amount: 1, precision: 0 },
|
|
2370
|
+
measurement: i.measurement ?? null
|
|
2371
2371
|
},
|
|
2372
|
-
key:
|
|
2373
|
-
unit:
|
|
2372
|
+
key: i.sku._id,
|
|
2373
|
+
unit: i.sku.unit,
|
|
2374
2374
|
"onUpdate:modelValue": (t) => {
|
|
2375
2375
|
if (!t) return;
|
|
2376
2376
|
const p = {
|
|
2377
|
-
...
|
|
2377
|
+
...i,
|
|
2378
2378
|
quantity: t.amount,
|
|
2379
2379
|
measurement: t.measurement
|
|
2380
2380
|
};
|
|
@@ -2394,10 +2394,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2394
2394
|
id: "Delete",
|
|
2395
2395
|
header: "",
|
|
2396
2396
|
cell(s) {
|
|
2397
|
-
const
|
|
2397
|
+
const i = s.row.original, r = s.row.index;
|
|
2398
2398
|
return k("div", { class: "flex justify-end" }, [
|
|
2399
2399
|
k(J.FmButton, {
|
|
2400
|
-
key:
|
|
2400
|
+
key: i.sku._id,
|
|
2401
2401
|
class: "delete-button",
|
|
2402
2402
|
type: "button",
|
|
2403
2403
|
icon: "delete",
|
|
@@ -2417,7 +2417,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2417
2417
|
}
|
|
2418
2418
|
}
|
|
2419
2419
|
];
|
|
2420
|
-
return (s,
|
|
2420
|
+
return (s, i) => {
|
|
2421
2421
|
const r = F("FmTable");
|
|
2422
2422
|
return x(), H(r, {
|
|
2423
2423
|
"column-defs": d,
|
|
@@ -2432,7 +2432,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2432
2432
|
}), ts = { class: "flex items-center gap-8 mb-8" }, ns = /* @__PURE__ */ Y({
|
|
2433
2433
|
__name: "InventoryTransferOutTable",
|
|
2434
2434
|
setup(_) {
|
|
2435
|
-
const h = L([]), o = me(), d = L(!1), s = L(!1),
|
|
2435
|
+
const h = L([]), o = me(), d = L(!1), s = L(!1), i = G(), r = se();
|
|
2436
2436
|
ie(async () => {
|
|
2437
2437
|
const I = /* @__PURE__ */ new Date(), f = /* @__PURE__ */ new Date();
|
|
2438
2438
|
f.setDate(f.getDate() - 30), d.value = !0;
|
|
@@ -2451,13 +2451,13 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2451
2451
|
});
|
|
2452
2452
|
async function t() {
|
|
2453
2453
|
try {
|
|
2454
|
-
s.value = !0, await o.manualSyncInventoryTransfer(r.currentLocationDBName),
|
|
2454
|
+
s.value = !0, await o.manualSyncInventoryTransfer(r.currentLocationDBName), i == null || i.open({
|
|
2455
2455
|
title: "Sync Started",
|
|
2456
2456
|
message: "Inventory transfers sync queued successfully.",
|
|
2457
2457
|
type: "success"
|
|
2458
2458
|
});
|
|
2459
2459
|
} catch (I) {
|
|
2460
|
-
|
|
2460
|
+
i == null || i.open({
|
|
2461
2461
|
title: "Sync Failed",
|
|
2462
2462
|
message: `Failed to queue inventory transfers sync. ${I == null ? void 0 : I.message}`,
|
|
2463
2463
|
type: "error"
|
|
@@ -2556,8 +2556,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2556
2556
|
return (I, f) => {
|
|
2557
2557
|
const g = F("FmButton"), y = F("FmTable");
|
|
2558
2558
|
return x(), E(P, null, [
|
|
2559
|
-
|
|
2560
|
-
f[1] || (f[1] =
|
|
2559
|
+
l("div", ts, [
|
|
2560
|
+
f[1] || (f[1] = l("span", null, "Last 30 Days:", -1)),
|
|
2561
2561
|
A(g, {
|
|
2562
2562
|
"prepend-icon": "sync",
|
|
2563
2563
|
variant: "secondary",
|
|
@@ -2599,7 +2599,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2599
2599
|
currentLocationSubsidiary: {}
|
|
2600
2600
|
},
|
|
2601
2601
|
setup(_) {
|
|
2602
|
-
const h = be(), o = te(), d = ce(), s = me(),
|
|
2602
|
+
const h = be(), o = te(), d = ce(), s = me(), i = G(), { t: r } = ve(), t = L([]), p = [{ label: "Transfer Out" }, { label: "History" }], S = L(p[0]), I = L(!1), f = L(null), g = L(null), y = _, w = O(() => {
|
|
2603
2603
|
const m = o.currentLocationSetting, a = o.configuredLocations;
|
|
2604
2604
|
return y.nsLocations.map((u) => ({
|
|
2605
2605
|
label: u.name,
|
|
@@ -2633,7 +2633,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2633
2633
|
async function n() {
|
|
2634
2634
|
if (e.value) {
|
|
2635
2635
|
if (!y.currentLocationSetting) {
|
|
2636
|
-
|
|
2636
|
+
i.open({
|
|
2637
2637
|
message: "Current location setting is not available",
|
|
2638
2638
|
type: "error"
|
|
2639
2639
|
});
|
|
@@ -2647,12 +2647,12 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2647
2647
|
netsuiteLocationId: g.value.netsuiteId,
|
|
2648
2648
|
netsuiteLocationName: g.value.name
|
|
2649
2649
|
}, a = `${y.currentLocationSetting.type}_${y.currentLocationSetting.id}`;
|
|
2650
|
-
await s.createInventoryTransfer(a, m), t.value = [], f.value = null, g.value = null,
|
|
2650
|
+
await s.createInventoryTransfer(a, m), t.value = [], f.value = null, g.value = null, i.open({
|
|
2651
2651
|
message: "Inventort transfer created successfully",
|
|
2652
2652
|
type: "success"
|
|
2653
2653
|
});
|
|
2654
2654
|
} catch {
|
|
2655
|
-
|
|
2655
|
+
i.open({
|
|
2656
2656
|
message: "Failed to create inventory transfer",
|
|
2657
2657
|
type: "error"
|
|
2658
2658
|
});
|
|
@@ -2775,7 +2775,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2775
2775
|
])),
|
|
2776
2776
|
_: 1
|
|
2777
2777
|
}),
|
|
2778
|
-
|
|
2778
|
+
l("div", as, [
|
|
2779
2779
|
g.value ? j("", !0) : (x(), H(X, {
|
|
2780
2780
|
key: 0,
|
|
2781
2781
|
class: "my-4 w-full",
|
|
@@ -2793,10 +2793,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2793
2793
|
class: "mr-2",
|
|
2794
2794
|
outline: ""
|
|
2795
2795
|
}),
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2796
|
+
l("div", is, [
|
|
2797
|
+
l("span", rs, R(g.value.name), 1),
|
|
2798
|
+
l("span", us, "ID: " + R(g.value.netsuiteId), 1),
|
|
2799
|
+
l("span", ds, "Subsidiary: " + R(g.value.subsidiaryName), 1)
|
|
2800
2800
|
]),
|
|
2801
2801
|
A(z, {
|
|
2802
2802
|
class: "ml-2",
|
|
@@ -2806,7 +2806,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2806
2806
|
})
|
|
2807
2807
|
])) : j("", !0)
|
|
2808
2808
|
]),
|
|
2809
|
-
|
|
2809
|
+
l("div", cs, [
|
|
2810
2810
|
A(z, {
|
|
2811
2811
|
class: "ml-auto",
|
|
2812
2812
|
variant: "secondary",
|
|
@@ -2819,7 +2819,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2819
2819
|
modelValue: t.value,
|
|
2820
2820
|
"onUpdate:modelValue": a[5] || (a[5] = (U) => t.value = U)
|
|
2821
2821
|
}, null, 8, ["modelValue"]),
|
|
2822
|
-
|
|
2822
|
+
l("div", ms, [
|
|
2823
2823
|
A(z, {
|
|
2824
2824
|
class: "ml-auto mt-4",
|
|
2825
2825
|
variant: "primary",
|
|
@@ -2854,7 +2854,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2854
2854
|
currentLocationSetting: {}
|
|
2855
2855
|
},
|
|
2856
2856
|
setup(_) {
|
|
2857
|
-
const h = le(), o = me(), d = G(), s = L(!1),
|
|
2857
|
+
const h = le(), o = me(), d = G(), s = L(!1), i = _, r = L([]), t = L(/* @__PURE__ */ new Set()), p = L(!1), S = L($.enum[1]), I = [
|
|
2858
2858
|
{ value: $.enum[1], label: "Version 1" },
|
|
2859
2859
|
{
|
|
2860
2860
|
value: $.enum[2],
|
|
@@ -2875,7 +2875,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2875
2875
|
var m;
|
|
2876
2876
|
s.value = !0;
|
|
2877
2877
|
try {
|
|
2878
|
-
const a = ((m =
|
|
2878
|
+
const a = ((m = i.currentLocationSetting) == null ? void 0 : m.id) || "", u = await o.getUnSyncTransferInOrders(a);
|
|
2879
2879
|
r.value = u, t.value = /* @__PURE__ */ new Set(), d.open({
|
|
2880
2880
|
message: "Check unsync transfer in order successfully",
|
|
2881
2881
|
type: "success"
|
|
@@ -2925,7 +2925,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2925
2925
|
var X;
|
|
2926
2926
|
const u = F("FmButton"), b = F("FmCheckbox"), B = F("FmRadio"), T = F("FmRadioGroup"), M = F("FmDialog");
|
|
2927
2927
|
return x(), E("div", gs, [
|
|
2928
|
-
|
|
2928
|
+
l("span", null, "Current date and time: " + R((/* @__PURE__ */ new Date()).toLocaleString()), 1),
|
|
2929
2929
|
A(u, {
|
|
2930
2930
|
label: "Check Unsync Transfer Order (Last 2 months)",
|
|
2931
2931
|
variant: "primary",
|
|
@@ -2934,8 +2934,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2934
2934
|
loading: s.value
|
|
2935
2935
|
}, null, 8, ["disabled", "loading"]),
|
|
2936
2936
|
r.value.length > 0 ? (x(), E("div", ys, [
|
|
2937
|
-
a[3] || (a[3] =
|
|
2938
|
-
|
|
2937
|
+
a[3] || (a[3] = l("p", null, "Transfer Order NetSuite ID not match with existing orders", -1)),
|
|
2938
|
+
l("div", As, [
|
|
2939
2939
|
(X = V(h).sessionUser.value) != null && X.role.isAdmin ? (x(), H(b, {
|
|
2940
2940
|
key: 0,
|
|
2941
2941
|
label: "Select All",
|
|
@@ -2945,7 +2945,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2945
2945
|
disabled: s.value,
|
|
2946
2946
|
"onUpdate:modelValue": y
|
|
2947
2947
|
}, null, 8, ["modelValue", "indeterminate", "disabled"])) : j("", !0),
|
|
2948
|
-
|
|
2948
|
+
l("ul", bs, [
|
|
2949
2949
|
(x(!0), E(P, null, ee(r.value, (D) => {
|
|
2950
2950
|
var z;
|
|
2951
2951
|
return x(), E("li", {
|
|
@@ -2964,7 +2964,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2964
2964
|
}), 128))
|
|
2965
2965
|
])
|
|
2966
2966
|
]),
|
|
2967
|
-
|
|
2967
|
+
l("div", xs, [
|
|
2968
2968
|
A(Ee, null, {
|
|
2969
2969
|
default: N(() => [
|
|
2970
2970
|
r.value.length > 0 ? (x(), H(u, {
|
|
@@ -2986,10 +2986,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2986
2986
|
overlay: !0
|
|
2987
2987
|
}, {
|
|
2988
2988
|
"dialog-header": N(() => a[4] || (a[4] = [
|
|
2989
|
-
|
|
2989
|
+
l("span", { class: "fm-typo-en-heading-lg-700" }, "Select Sync Version", -1)
|
|
2990
2990
|
])),
|
|
2991
2991
|
"dialog-footer": N(() => [
|
|
2992
|
-
|
|
2992
|
+
l("div", Ss, [
|
|
2993
2993
|
A(u, {
|
|
2994
2994
|
label: "Not now",
|
|
2995
2995
|
variant: "secondary",
|
|
@@ -3003,8 +3003,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3003
3003
|
])
|
|
3004
3004
|
]),
|
|
3005
3005
|
default: N(() => [
|
|
3006
|
-
|
|
3007
|
-
|
|
3006
|
+
l("div", Is, [
|
|
3007
|
+
l("p", null, " Choose which order version to use for syncing " + R(t.value.size) + " selected transfer orders: ", 1),
|
|
3008
3008
|
A(T, {
|
|
3009
3009
|
modelValue: S.value,
|
|
3010
3010
|
"onUpdate:modelValue": a[0] || (a[0] = (D) => S.value = D)
|
|
@@ -3035,7 +3035,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3035
3035
|
currentLocationSetting: {}
|
|
3036
3036
|
},
|
|
3037
3037
|
setup(_) {
|
|
3038
|
-
const h = le(), o = me(), d = G(), s = L(!1),
|
|
3038
|
+
const h = le(), o = me(), d = G(), s = L(!1), i = _, r = L([]), t = L(/* @__PURE__ */ new Set()), p = L(!1), S = L($.enum[1]), I = [
|
|
3039
3039
|
{ value: $.enum[1], label: "Version 1" },
|
|
3040
3040
|
{
|
|
3041
3041
|
value: $.enum[2],
|
|
@@ -3056,7 +3056,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3056
3056
|
var m;
|
|
3057
3057
|
s.value = !0;
|
|
3058
3058
|
try {
|
|
3059
|
-
const a = ((m =
|
|
3059
|
+
const a = ((m = i.currentLocationSetting) == null ? void 0 : m.id) || "", u = await o.getUnSyncPurchaseOrders(a);
|
|
3060
3060
|
r.value = u, t.value = /* @__PURE__ */ new Set(), d.open({
|
|
3061
3061
|
message: "Check unsync purchase order successfully",
|
|
3062
3062
|
type: "success"
|
|
@@ -3106,7 +3106,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3106
3106
|
var X;
|
|
3107
3107
|
const u = F("FmButton"), b = F("FmCheckbox"), B = F("FmRadio"), T = F("FmRadioGroup"), M = F("FmDialog");
|
|
3108
3108
|
return x(), E("div", ks, [
|
|
3109
|
-
|
|
3109
|
+
l("span", null, "Current date and time: " + R((/* @__PURE__ */ new Date()).toLocaleString()), 1),
|
|
3110
3110
|
A(u, {
|
|
3111
3111
|
label: "Check Unsync Purchase Order (Last 2 months)",
|
|
3112
3112
|
variant: "primary",
|
|
@@ -3115,8 +3115,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3115
3115
|
loading: s.value
|
|
3116
3116
|
}, null, 8, ["disabled", "loading"]),
|
|
3117
3117
|
r.value.length > 0 ? (x(), E("div", Fs, [
|
|
3118
|
-
a[3] || (a[3] =
|
|
3119
|
-
|
|
3118
|
+
a[3] || (a[3] = l("p", null, "Purchase Order NetSuite ID not match with existing orders", -1)),
|
|
3119
|
+
l("div", Cs, [
|
|
3120
3120
|
(X = V(h).sessionUser.value) != null && X.role.isAdmin ? (x(), H(b, {
|
|
3121
3121
|
key: 0,
|
|
3122
3122
|
label: "Select All",
|
|
@@ -3126,7 +3126,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3126
3126
|
disabled: s.value,
|
|
3127
3127
|
"onUpdate:modelValue": y
|
|
3128
3128
|
}, null, 8, ["modelValue", "indeterminate", "disabled"])) : j("", !0),
|
|
3129
|
-
|
|
3129
|
+
l("ul", Bs, [
|
|
3130
3130
|
(x(!0), E(P, null, ee(r.value, (D) => {
|
|
3131
3131
|
var z;
|
|
3132
3132
|
return x(), E("li", {
|
|
@@ -3135,17 +3135,19 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3135
3135
|
}, [
|
|
3136
3136
|
(z = V(h).sessionUser.value) != null && z.role.isAdmin ? (x(), H(b, {
|
|
3137
3137
|
key: 0,
|
|
3138
|
-
label: `${D.id} (${D.tranid})`,
|
|
3138
|
+
label: `${D.id} (${D.tranid}) [${D.entity.id} (${D.entity.name})]`,
|
|
3139
3139
|
value: D.id,
|
|
3140
3140
|
modelValue: C(D.id),
|
|
3141
3141
|
disabled: s.value,
|
|
3142
3142
|
"onUpdate:modelValue": (U) => w(D.id, U)
|
|
3143
|
-
}, null, 8, ["label", "value", "modelValue", "disabled", "onUpdate:modelValue"])) : (x(), E("
|
|
3143
|
+
}, null, 8, ["label", "value", "modelValue", "disabled", "onUpdate:modelValue"])) : (x(), E("div", Vs, [
|
|
3144
|
+
l("span", null, R(D.id) + " (" + R(D.tranid) + ") [" + R(D.entity.id) + " (" + R(D.entity.name) + ")] ", 1)
|
|
3145
|
+
]))
|
|
3144
3146
|
]);
|
|
3145
3147
|
}), 128))
|
|
3146
3148
|
])
|
|
3147
3149
|
]),
|
|
3148
|
-
|
|
3150
|
+
l("div", _s, [
|
|
3149
3151
|
A(Ee, null, {
|
|
3150
3152
|
default: N(() => [
|
|
3151
3153
|
r.value.length > 0 ? (x(), H(u, {
|
|
@@ -3167,10 +3169,10 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3167
3169
|
overlay: !0
|
|
3168
3170
|
}, {
|
|
3169
3171
|
"dialog-header": N(() => a[4] || (a[4] = [
|
|
3170
|
-
|
|
3172
|
+
l("span", { class: "fm-typo-en-heading-lg-700" }, "Select Sync Version", -1)
|
|
3171
3173
|
])),
|
|
3172
3174
|
"dialog-footer": N(() => [
|
|
3173
|
-
|
|
3175
|
+
l("div", Ns, [
|
|
3174
3176
|
A(u, {
|
|
3175
3177
|
label: "Not now",
|
|
3176
3178
|
variant: "secondary",
|
|
@@ -3184,8 +3186,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3184
3186
|
])
|
|
3185
3187
|
]),
|
|
3186
3188
|
default: N(() => [
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
+
l("div", Es, [
|
|
3190
|
+
l("p", null, " Choose which order version to use for syncing " + R(t.value.size) + " selected purchase orders: ", 1),
|
|
3189
3191
|
A(T, {
|
|
3190
3192
|
modelValue: S.value,
|
|
3191
3193
|
"onUpdate:modelValue": a[0] || (a[0] = (D) => S.value = D)
|
|
@@ -3217,7 +3219,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3217
3219
|
emits: ["update:show"],
|
|
3218
3220
|
setup(_, { emit: h }) {
|
|
3219
3221
|
var C;
|
|
3220
|
-
const o = le(), d = te(), s = _,
|
|
3222
|
+
const o = le(), d = te(), s = _, i = ue(s, "show"), { t: r } = Z(), t = h, p = se(), S = ((C = p._currentLocation) == null ? void 0 : C.type) || "", I = [
|
|
3221
3223
|
{
|
|
3222
3224
|
label: "Inventory Transfer (Out)",
|
|
3223
3225
|
value: "inventoryTransfer"
|
|
@@ -3240,8 +3242,8 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3240
3242
|
var u;
|
|
3241
3243
|
const n = F("FmIcon"), v = F("FmTabs"), m = F("FmButton"), a = F("FmSideSheet");
|
|
3242
3244
|
return x(), H(a, {
|
|
3243
|
-
modelValue: V(
|
|
3244
|
-
"onUpdate:modelValue": e[2] || (e[2] = (b) => re(
|
|
3245
|
+
modelValue: V(i),
|
|
3246
|
+
"onUpdate:modelValue": e[2] || (e[2] = (b) => re(i) ? i.value = b : null),
|
|
3245
3247
|
header: "Data migration (Xilnex)",
|
|
3246
3248
|
"dismiss-away": "",
|
|
3247
3249
|
"close-button": "",
|
|
@@ -3266,7 +3268,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3266
3268
|
], 64)) : (x(), E("div", Ms, " Netsuite is not configured for this location. Please contact your administrator. "))
|
|
3267
3269
|
]),
|
|
3268
3270
|
"side-sheet-footer": N(() => [
|
|
3269
|
-
|
|
3271
|
+
l("div", zs, [
|
|
3270
3272
|
A(m, {
|
|
3271
3273
|
variant: "tertiary",
|
|
3272
3274
|
label: V(r)("common.close"),
|
|
@@ -3281,15 +3283,15 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3281
3283
|
fn: N(() => {
|
|
3282
3284
|
var b;
|
|
3283
3285
|
return [
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
e[3] || (e[3] =
|
|
3287
|
-
|
|
3286
|
+
l("div", Ds, [
|
|
3287
|
+
l("div", Ts, [
|
|
3288
|
+
e[3] || (e[3] = l("div", { class: "fm-typo-en-title-md-600" }, "NetSuite Integration", -1)),
|
|
3289
|
+
l("div", Rs, [
|
|
3288
3290
|
A(n, {
|
|
3289
3291
|
name: V(S),
|
|
3290
3292
|
size: "sm"
|
|
3291
3293
|
}, null, 8, ["name"]),
|
|
3292
|
-
|
|
3294
|
+
l("div", Os, R((b = V(p)._currentLocation) == null ? void 0 : b.name), 1)
|
|
3293
3295
|
])
|
|
3294
3296
|
]),
|
|
3295
3297
|
A(v, {
|
|
@@ -3309,7 +3311,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3309
3311
|
__name: "NetSuite",
|
|
3310
3312
|
setup(_) {
|
|
3311
3313
|
const h = te(), o = G(), d = L(!1), s = L(!1);
|
|
3312
|
-
async function
|
|
3314
|
+
async function i() {
|
|
3313
3315
|
s.value = !0;
|
|
3314
3316
|
}
|
|
3315
3317
|
const r = L([]);
|
|
@@ -3341,20 +3343,20 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3341
3343
|
"cursor-pointer": !0,
|
|
3342
3344
|
"hover:border-fm-color-primary": !0
|
|
3343
3345
|
}),
|
|
3344
|
-
onClick: S[0] || (S[0] = (g) =>
|
|
3346
|
+
onClick: S[0] || (S[0] = (g) => i())
|
|
3345
3347
|
}, {
|
|
3346
3348
|
default: N(() => [
|
|
3347
3349
|
A(I, null, {
|
|
3348
3350
|
default: N(() => [
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
+
l("div", Us, [
|
|
3352
|
+
l("img", {
|
|
3351
3353
|
src: V(ln),
|
|
3352
3354
|
alt: "NetSuite"
|
|
3353
3355
|
}, null, 8, Hs)
|
|
3354
3356
|
]),
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3357
|
+
l("div", Xs, [
|
|
3358
|
+
l("div", Ys, R(V(t)("inventory.integration.netsuite.title")), 1),
|
|
3359
|
+
l("div", Ps, R(V(t)("inventory.integration.netsuite.description")), 1)
|
|
3358
3360
|
])
|
|
3359
3361
|
]),
|
|
3360
3362
|
_: 1
|
|
@@ -3412,7 +3414,7 @@ const Mt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
3412
3414
|
];
|
|
3413
3415
|
async function Js(_, h, o) {
|
|
3414
3416
|
var r;
|
|
3415
|
-
const d = await Ks(o), s = [],
|
|
3417
|
+
const d = await Ks(o), s = [], i = {};
|
|
3416
3418
|
for (const t in d) {
|
|
3417
3419
|
const p = d[t];
|
|
3418
3420
|
for (let S = 0; S < p.length; S++) {
|
|
@@ -3447,7 +3449,7 @@ async function Js(_, h, o) {
|
|
|
3447
3449
|
currency: "MYR"
|
|
3448
3450
|
}
|
|
3449
3451
|
};
|
|
3450
|
-
y != "0" && w == "0" && console.warn(`Item ${f} ${g} has 0 cost.`),
|
|
3452
|
+
y != "0" && w == "0" && console.warn(`Item ${f} ${g} has 0 cost.`), i[r = C._id] ?? (i[r] = {
|
|
3451
3453
|
skuAdjustment: {
|
|
3452
3454
|
sku: C,
|
|
3453
3455
|
fromBalance: ne.fromNumber(0),
|
|
@@ -3475,17 +3477,17 @@ async function Js(_, h, o) {
|
|
|
3475
3477
|
}
|
|
3476
3478
|
return {
|
|
3477
3479
|
errors: s,
|
|
3478
|
-
rows:
|
|
3480
|
+
rows: i
|
|
3479
3481
|
};
|
|
3480
3482
|
}
|
|
3481
3483
|
async function Ks(_) {
|
|
3482
|
-
const h = await new Promise((
|
|
3484
|
+
const h = await new Promise((i, r) => {
|
|
3483
3485
|
const t = new FileReader();
|
|
3484
|
-
t.onload = (p) =>
|
|
3486
|
+
t.onload = (p) => i(p.target.result), t.onerror = r, t.readAsArrayBuffer(_);
|
|
3485
3487
|
}), o = Me(h, { type: "array" }), d = o.SheetNames, s = {};
|
|
3486
|
-
for (const
|
|
3487
|
-
const r = await qs(o.Sheets[
|
|
3488
|
-
s[
|
|
3488
|
+
for (const i of d) {
|
|
3489
|
+
const r = await qs(o.Sheets[i]);
|
|
3490
|
+
s[i] = r;
|
|
3489
3491
|
}
|
|
3490
3492
|
return s;
|
|
3491
3493
|
}
|
|
@@ -3495,11 +3497,11 @@ async function qs(_) {
|
|
|
3495
3497
|
range: 12
|
|
3496
3498
|
}), o = [];
|
|
3497
3499
|
for (let d = 0; d < h.length; d++) {
|
|
3498
|
-
const s = h[d],
|
|
3500
|
+
const s = h[d], i = {};
|
|
3499
3501
|
for (const r of Se)
|
|
3500
|
-
|
|
3502
|
+
i[r] = String(s[r]).trim();
|
|
3501
3503
|
o.push({
|
|
3502
|
-
...
|
|
3504
|
+
...i,
|
|
3503
3505
|
excelRow: d + 13
|
|
3504
3506
|
// Excel rows start from 1, and we skip the first 12 rows
|
|
3505
3507
|
});
|
|
@@ -3522,7 +3524,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3522
3524
|
}, go = /* @__PURE__ */ Y({
|
|
3523
3525
|
__name: "XilnexOpeningImport",
|
|
3524
3526
|
setup(_) {
|
|
3525
|
-
const h = st(), o = te(), d = ce(), s = Ve(),
|
|
3527
|
+
const h = st(), o = te(), d = ce(), s = Ve(), i = G(), r = se(), t = O(() => [
|
|
3526
3528
|
{
|
|
3527
3529
|
value: "xilnex",
|
|
3528
3530
|
label: "Xilnex",
|
|
@@ -3642,7 +3644,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3642
3644
|
);
|
|
3643
3645
|
y.value = B, w.value = Object.values(T);
|
|
3644
3646
|
} catch {
|
|
3645
|
-
|
|
3647
|
+
i.open({
|
|
3646
3648
|
message: "Error verifying file",
|
|
3647
3649
|
type: "error"
|
|
3648
3650
|
});
|
|
@@ -3656,7 +3658,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3656
3658
|
e.value = !0;
|
|
3657
3659
|
try {
|
|
3658
3660
|
if (!a.value) {
|
|
3659
|
-
|
|
3661
|
+
i.open({
|
|
3660
3662
|
message: "Please select a date for the opening balance",
|
|
3661
3663
|
type: "error"
|
|
3662
3664
|
});
|
|
@@ -3666,12 +3668,12 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3666
3668
|
effectiveAt: a.value,
|
|
3667
3669
|
skuAdjustments: w.value.map((b) => b.skuAdjustment),
|
|
3668
3670
|
skuBalances: w.value.map((b) => b.skuBalance)
|
|
3669
|
-
}),
|
|
3671
|
+
}), i.open({
|
|
3670
3672
|
message: "Opening balance imported successfully",
|
|
3671
3673
|
type: "success"
|
|
3672
3674
|
}), await h.fetchClosingDocumentId();
|
|
3673
3675
|
} catch {
|
|
3674
|
-
|
|
3676
|
+
i.open({
|
|
3675
3677
|
message: "Error importing opening balance",
|
|
3676
3678
|
type: "error"
|
|
3677
3679
|
});
|
|
@@ -3695,7 +3697,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3695
3697
|
return (b, B) => {
|
|
3696
3698
|
const T = F("FmLabel"), M = F("FmField"), X = F("FmSimpleDatePicker"), D = F("FmButton"), z = F("FmIcon"), U = F("FmRadio"), de = F("FmRadioGroup"), xe = F("FmTable");
|
|
3697
3699
|
return x(), E("div", Gs, [
|
|
3698
|
-
|
|
3700
|
+
l("div", Zs, [
|
|
3699
3701
|
A(T, { label: "Latest closing" })
|
|
3700
3702
|
]),
|
|
3701
3703
|
A(M, {
|
|
@@ -3708,7 +3710,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3708
3710
|
_: 1
|
|
3709
3711
|
}),
|
|
3710
3712
|
V(h).state.closingDocumentId ? (x(), E("div", vo, [
|
|
3711
|
-
B[6] || (B[6] =
|
|
3713
|
+
B[6] || (B[6] = l("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Not able to import opening balance as closing document already exists. ", -1)),
|
|
3712
3714
|
V(r)._currentLocation ? (x(), E(P, { key: 0 }, [
|
|
3713
3715
|
A(T, { label: "Location ID" }),
|
|
3714
3716
|
A(M, {
|
|
@@ -3741,7 +3743,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3741
3743
|
]),
|
|
3742
3744
|
_: 1
|
|
3743
3745
|
}, 8, ["modelValue"]),
|
|
3744
|
-
|
|
3746
|
+
l("div", $s, [
|
|
3745
3747
|
A(T, { label: "Stock take file" })
|
|
3746
3748
|
]),
|
|
3747
3749
|
A(Oe, {
|
|
@@ -3753,10 +3755,10 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3753
3755
|
I.value ? {
|
|
3754
3756
|
name: "default",
|
|
3755
3757
|
fn: N(({ openFileDialog: Q }) => [
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3758
|
+
l("div", eo, [
|
|
3759
|
+
l("div", to, [
|
|
3760
|
+
l("div", no, [
|
|
3761
|
+
l("div", so, R(I.value.name), 1),
|
|
3760
3762
|
A(D, {
|
|
3761
3763
|
label: V(S)("inventory.ingredient.import.replaceFile"),
|
|
3762
3764
|
variant: "secondary",
|
|
@@ -3785,9 +3787,9 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3785
3787
|
disabled: Q.disabled
|
|
3786
3788
|
}, {
|
|
3787
3789
|
label: N(() => [
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3790
|
+
l("div", oo, [
|
|
3791
|
+
l("span", ao, R(Q.label), 1),
|
|
3792
|
+
l("span", lo, R(Q.disabled ? Q.disabledReason : Q.subLabel), 1)
|
|
3791
3793
|
]),
|
|
3792
3794
|
Q.value === "netsuite" && V(o).currentLocationSetting ? (x(), E("div", io, [
|
|
3793
3795
|
A(z, {
|
|
@@ -3797,10 +3799,10 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3797
3799
|
class: "mr-2",
|
|
3798
3800
|
outline: !0
|
|
3799
3801
|
}),
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3802
|
+
l("div", ro, [
|
|
3803
|
+
l("span", uo, R(V(o).currentLocationSetting.name), 1),
|
|
3804
|
+
l("span", co, "ID: " + R(V(o).currentLocationSetting.netSuiteId), 1),
|
|
3805
|
+
l("span", mo, "Subsidiary: " + R(V(o).getSubsidiaryFullName(
|
|
3804
3806
|
V(o).currentLocationSetting.subsidiaryId
|
|
3805
3807
|
).fullName), 1)
|
|
3806
3808
|
])
|
|
@@ -3811,7 +3813,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3811
3813
|
]),
|
|
3812
3814
|
_: 1
|
|
3813
3815
|
}, 8, ["modelValue"]),
|
|
3814
|
-
|
|
3816
|
+
l("div", fo, [
|
|
3815
3817
|
A(D, {
|
|
3816
3818
|
class: "ml-auto mt-4",
|
|
3817
3819
|
variant: "secondary",
|
|
@@ -3823,7 +3825,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3823
3825
|
}, null, 8, ["disabled", "loading"])
|
|
3824
3826
|
]),
|
|
3825
3827
|
I.value && w.value.length > 0 ? (x(), E(P, { key: 0 }, [
|
|
3826
|
-
B[4] || (B[4] =
|
|
3828
|
+
B[4] || (B[4] = l("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4" }, "Results", -1)),
|
|
3827
3829
|
A(xe, {
|
|
3828
3830
|
modelValue: f.value,
|
|
3829
3831
|
"onUpdate:modelValue": B[3] || (B[3] = (Q) => f.value = Q),
|
|
@@ -3834,13 +3836,13 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3834
3836
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
3835
3837
|
], 64)) : j("", !0),
|
|
3836
3838
|
y.value.length > 0 ? (x(), E(P, { key: 1 }, [
|
|
3837
|
-
B[5] || (B[5] =
|
|
3839
|
+
B[5] || (B[5] = l("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4 text-red-600" }, "Errors", -1)),
|
|
3838
3840
|
A(xe, {
|
|
3839
3841
|
"row-data": y.value,
|
|
3840
3842
|
"column-defs": c
|
|
3841
3843
|
}, null, 8, ["row-data"])
|
|
3842
3844
|
], 64)) : j("", !0),
|
|
3843
|
-
|
|
3845
|
+
l("div", po, [
|
|
3844
3846
|
w.value.length > 0 && !V(h).state.closingDocumentId ? (x(), H(D, {
|
|
3845
3847
|
key: 0,
|
|
3846
3848
|
class: "ml-auto mt-4",
|
|
@@ -3867,7 +3869,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3867
3869
|
emits: ["update:show"],
|
|
3868
3870
|
setup(_, { emit: h }) {
|
|
3869
3871
|
var f;
|
|
3870
|
-
const o = le(), s = ue(_, "show"), { t:
|
|
3872
|
+
const o = le(), s = ue(_, "show"), { t: i } = Z(), r = h, t = se(), p = ((f = t._currentLocation) == null ? void 0 : f.type) || "", S = [
|
|
3871
3873
|
{ label: fe(
|
|
3872
3874
|
"openingBalance"
|
|
3873
3875
|
/* OPENING_BALANCE */
|
|
@@ -3904,10 +3906,10 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3904
3906
|
];
|
|
3905
3907
|
}),
|
|
3906
3908
|
"side-sheet-footer": N(() => [
|
|
3907
|
-
|
|
3909
|
+
l("div", wo, [
|
|
3908
3910
|
A(c, {
|
|
3909
3911
|
variant: "tertiary",
|
|
3910
|
-
label: V(
|
|
3912
|
+
label: V(i)("common.close"),
|
|
3911
3913
|
onClick: y[1] || (y[1] = (v) => r("update:show", !1))
|
|
3912
3914
|
}, null, 8, ["label"])
|
|
3913
3915
|
])
|
|
@@ -3919,15 +3921,15 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3919
3921
|
fn: N(() => {
|
|
3920
3922
|
var v;
|
|
3921
3923
|
return [
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
y[3] || (y[3] =
|
|
3925
|
-
|
|
3924
|
+
l("div", yo, [
|
|
3925
|
+
l("div", Ao, [
|
|
3926
|
+
y[3] || (y[3] = l("div", { class: "fm-typo-en-title-md-600" }, "Data migration (Xilnex)", -1)),
|
|
3927
|
+
l("div", bo, [
|
|
3926
3928
|
A(w, {
|
|
3927
3929
|
name: V(p),
|
|
3928
3930
|
size: "sm"
|
|
3929
3931
|
}, null, 8, ["name"]),
|
|
3930
|
-
|
|
3932
|
+
l("div", ho, R((v = V(t)._currentLocation) == null ? void 0 : v.name), 1)
|
|
3931
3933
|
])
|
|
3932
3934
|
]),
|
|
3933
3935
|
A(C, {
|
|
@@ -3950,7 +3952,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3950
3952
|
async function s() {
|
|
3951
3953
|
d.value = !0, console.log("Opening Xilnex migration dialog");
|
|
3952
3954
|
}
|
|
3953
|
-
return (
|
|
3955
|
+
return (i, r) => {
|
|
3954
3956
|
const t = F("FmCardSection"), p = F("FmCard");
|
|
3955
3957
|
return V(h).enabledXilnexOpeningMigration && !V(o).businessLevel ? (x(), E(P, { key: 0 }, [
|
|
3956
3958
|
A(p, {
|
|
@@ -3966,14 +3968,14 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
3966
3968
|
default: N(() => [
|
|
3967
3969
|
A(t, null, {
|
|
3968
3970
|
default: N(() => r[2] || (r[2] = [
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3971
|
+
l("div", { class: "flex justify-center" }, [
|
|
3972
|
+
l("div", { class: "size-[100px] bg-gray-200 rounded-lg flex items-center justify-center" }, [
|
|
3973
|
+
l("span", { class: "text-lg font-bold text-gray-600" }, "Xilnex")
|
|
3972
3974
|
])
|
|
3973
3975
|
], -1),
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3976
|
+
l("div", { class: "flex flex-col items-center gap-2" }, [
|
|
3977
|
+
l("div", { class: "text-lg font-bold" }, "Xilnex"),
|
|
3978
|
+
l("div", { class: "text-fm-color-neutral-gray-300" }, "Data migration from Xilnex")
|
|
3977
3979
|
], -1)
|
|
3978
3980
|
])),
|
|
3979
3981
|
_: 1
|
|
@@ -4002,7 +4004,7 @@ const Gs = { class: "flex flex-col gap-4" }, Zs = { class: "flex flex-col" }, Ws
|
|
|
4002
4004
|
];
|
|
4003
4005
|
async function Co(_, h, o) {
|
|
4004
4006
|
var p;
|
|
4005
|
-
const d = await Bo(o), s = [],
|
|
4007
|
+
const d = await Bo(o), s = [], i = {}, r = Object.keys(d)[0], t = d[r];
|
|
4006
4008
|
for (let S = 0; S < t.length; S++) {
|
|
4007
4009
|
const I = t[S], f = I.code, g = I.description, y = I.quantity, w = I.unitcost;
|
|
4008
4010
|
if (f === "" || f === "undefined") {
|
|
@@ -4035,7 +4037,7 @@ async function Co(_, h, o) {
|
|
|
4035
4037
|
currency: "MYR"
|
|
4036
4038
|
}
|
|
4037
4039
|
};
|
|
4038
|
-
y != "0" && w == "0" && console.warn(`Item ${f} ${g} has 0 cost.`),
|
|
4040
|
+
y != "0" && w == "0" && console.warn(`Item ${f} ${g} has 0 cost.`), i[p = C._id] ?? (i[p] = {
|
|
4039
4041
|
skuAdjustment: {
|
|
4040
4042
|
sku: C,
|
|
4041
4043
|
fromBalance: ne.fromNumber(0),
|
|
@@ -4062,17 +4064,17 @@ async function Co(_, h, o) {
|
|
|
4062
4064
|
}
|
|
4063
4065
|
return {
|
|
4064
4066
|
errors: s,
|
|
4065
|
-
rows:
|
|
4067
|
+
rows: i
|
|
4066
4068
|
};
|
|
4067
4069
|
}
|
|
4068
4070
|
async function Bo(_) {
|
|
4069
|
-
const h = await new Promise((
|
|
4071
|
+
const h = await new Promise((i, r) => {
|
|
4070
4072
|
const t = new FileReader();
|
|
4071
|
-
t.onload = (p) =>
|
|
4073
|
+
t.onload = (p) => i(p.target.result), t.onerror = r, t.readAsArrayBuffer(_);
|
|
4072
4074
|
}), o = Me(h, { type: "array" }), d = o.SheetNames, s = {};
|
|
4073
|
-
for (const
|
|
4074
|
-
const r = await Vo(o.Sheets[
|
|
4075
|
-
s[
|
|
4075
|
+
for (const i of d) {
|
|
4076
|
+
const r = await Vo(o.Sheets[i]);
|
|
4077
|
+
s[i] = r;
|
|
4076
4078
|
}
|
|
4077
4079
|
return s;
|
|
4078
4080
|
}
|
|
@@ -4082,11 +4084,11 @@ async function Vo(_) {
|
|
|
4082
4084
|
range: 1
|
|
4083
4085
|
}), o = [];
|
|
4084
4086
|
for (let d = 0; d < h.length; d++) {
|
|
4085
|
-
const s = h[d],
|
|
4087
|
+
const s = h[d], i = {};
|
|
4086
4088
|
for (const r of we)
|
|
4087
|
-
|
|
4089
|
+
i[r] = String(s[r]).trim();
|
|
4088
4090
|
o.push({
|
|
4089
|
-
...
|
|
4091
|
+
...i,
|
|
4090
4092
|
excelRow: d + 2
|
|
4091
4093
|
// Excel rows start from 1, and we skip the first row
|
|
4092
4094
|
});
|
|
@@ -4103,13 +4105,13 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4103
4105
|
}, Oo = { class: "line-clamp-2 text-ellipsis break-all" }, Mo = { class: "flex flex-col" }, zo = { class: "font-medium" }, jo = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Uo = { class: "flex" }, Ho = { class: "flex" }, Xo = { key: 1 }, Yo = /* @__PURE__ */ Y({
|
|
4104
4106
|
__name: "SynergyOpeningImport",
|
|
4105
4107
|
setup(_) {
|
|
4106
|
-
const h = ot(), o = ce(), d = Ve(), s = G(),
|
|
4108
|
+
const h = ot(), o = ce(), d = Ve(), s = G(), i = O(() => [
|
|
4107
4109
|
{
|
|
4108
4110
|
value: "synergy",
|
|
4109
4111
|
label: "Synergy",
|
|
4110
4112
|
subLabel: "Based on Synergy's item cost from excel file"
|
|
4111
4113
|
}
|
|
4112
|
-
]), r = L(
|
|
4114
|
+
]), r = L(i.value[0].value), { t } = ve(), p = L(null), S = L(), I = L(""), f = L([]), g = L([]), y = [
|
|
4113
4115
|
{
|
|
4114
4116
|
id: "ingredient",
|
|
4115
4117
|
header: () => "Ingredient",
|
|
@@ -4266,7 +4268,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4266
4268
|
return (a, u) => {
|
|
4267
4269
|
const b = F("FmLabel"), B = F("FmField"), T = F("FmSimpleDatePicker"), M = F("FmButton"), X = F("FmRadio"), D = F("FmRadioGroup"), z = F("FmTable");
|
|
4268
4270
|
return x(), E("div", _o, [
|
|
4269
|
-
|
|
4271
|
+
l("div", Eo, [
|
|
4270
4272
|
A(b, { label: "Latest closing" })
|
|
4271
4273
|
]),
|
|
4272
4274
|
A(B, {
|
|
@@ -4279,7 +4281,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4279
4281
|
_: 1
|
|
4280
4282
|
}),
|
|
4281
4283
|
V(h).state.closingDocumentId ? (x(), E("div", Xo, u[6] || (u[6] = [
|
|
4282
|
-
|
|
4284
|
+
l("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Not able to import opening balance as closing document already exists. ", -1)
|
|
4283
4285
|
]))) : (x(), E("div", No, [
|
|
4284
4286
|
A(T, {
|
|
4285
4287
|
modelValue: v.value,
|
|
@@ -4300,7 +4302,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4300
4302
|
]),
|
|
4301
4303
|
_: 1
|
|
4302
4304
|
}, 8, ["modelValue"]),
|
|
4303
|
-
|
|
4305
|
+
l("div", Lo, [
|
|
4304
4306
|
A(b, { label: "Stock take file" })
|
|
4305
4307
|
]),
|
|
4306
4308
|
A(Oe, {
|
|
@@ -4312,10 +4314,10 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4312
4314
|
p.value ? {
|
|
4313
4315
|
name: "default",
|
|
4314
4316
|
fn: N(({ openFileDialog: U }) => [
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4317
|
+
l("div", Do, [
|
|
4318
|
+
l("div", To, [
|
|
4319
|
+
l("div", Ro, [
|
|
4320
|
+
l("div", Oo, R(p.value.name), 1),
|
|
4319
4321
|
A(M, {
|
|
4320
4322
|
label: V(t)("inventory.ingredient.import.replaceFile"),
|
|
4321
4323
|
variant: "secondary",
|
|
@@ -4336,7 +4338,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4336
4338
|
class: "my-5"
|
|
4337
4339
|
}, {
|
|
4338
4340
|
default: N(() => [
|
|
4339
|
-
(x(!0), E(P, null, ee(
|
|
4341
|
+
(x(!0), E(P, null, ee(i.value, (U) => (x(), H(X, {
|
|
4340
4342
|
key: U.value,
|
|
4341
4343
|
value: U.value,
|
|
4342
4344
|
label: U.label,
|
|
@@ -4344,9 +4346,9 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4344
4346
|
disabled: U.disabled
|
|
4345
4347
|
}, {
|
|
4346
4348
|
label: N(() => [
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4349
|
+
l("div", Mo, [
|
|
4350
|
+
l("span", zo, R(U.label), 1),
|
|
4351
|
+
l("span", jo, R(U.disabled ? U.disabledReason : U.subLabel), 1)
|
|
4350
4352
|
])
|
|
4351
4353
|
]),
|
|
4352
4354
|
_: 2
|
|
@@ -4354,7 +4356,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4354
4356
|
]),
|
|
4355
4357
|
_: 1
|
|
4356
4358
|
}, 8, ["modelValue"]),
|
|
4357
|
-
|
|
4359
|
+
l("div", Uo, [
|
|
4358
4360
|
A(M, {
|
|
4359
4361
|
class: "ml-auto mt-4",
|
|
4360
4362
|
variant: "secondary",
|
|
@@ -4366,7 +4368,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4366
4368
|
}, null, 8, ["disabled", "loading"])
|
|
4367
4369
|
]),
|
|
4368
4370
|
p.value && g.value.length > 0 ? (x(), E(P, { key: 0 }, [
|
|
4369
|
-
u[4] || (u[4] =
|
|
4371
|
+
u[4] || (u[4] = l("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4" }, "Results", -1)),
|
|
4370
4372
|
A(z, {
|
|
4371
4373
|
modelValue: S.value,
|
|
4372
4374
|
"onUpdate:modelValue": u[3] || (u[3] = (U) => S.value = U),
|
|
@@ -4377,13 +4379,13 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4377
4379
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
4378
4380
|
], 64)) : j("", !0),
|
|
4379
4381
|
f.value.length > 0 ? (x(), E(P, { key: 1 }, [
|
|
4380
|
-
u[5] || (u[5] =
|
|
4382
|
+
u[5] || (u[5] = l("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4 text-red-600" }, "Errors", -1)),
|
|
4381
4383
|
A(z, {
|
|
4382
4384
|
"row-data": f.value,
|
|
4383
4385
|
"column-defs": w
|
|
4384
4386
|
}, null, 8, ["row-data"])
|
|
4385
4387
|
], 64)) : j("", !0),
|
|
4386
|
-
|
|
4388
|
+
l("div", Ho, [
|
|
4387
4389
|
g.value.length > 0 && !V(h).state.closingDocumentId ? (x(), H(M, {
|
|
4388
4390
|
key: 0,
|
|
4389
4391
|
class: "ml-auto mt-4",
|
|
@@ -4410,7 +4412,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4410
4412
|
emits: ["update:show"],
|
|
4411
4413
|
setup(_, { emit: h }) {
|
|
4412
4414
|
var S;
|
|
4413
|
-
const o = le(), s = ue(_, "show"), { t:
|
|
4415
|
+
const o = le(), s = ue(_, "show"), { t: i } = Z(), r = h, t = se(), p = ((S = t._currentLocation) == null ? void 0 : S.type) || "";
|
|
4414
4416
|
return (I, f) => {
|
|
4415
4417
|
var C;
|
|
4416
4418
|
const g = F("FmIcon"), y = F("FmButton"), w = F("FmSideSheet");
|
|
@@ -4431,10 +4433,10 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4431
4433
|
];
|
|
4432
4434
|
}),
|
|
4433
4435
|
"side-sheet-footer": N(() => [
|
|
4434
|
-
|
|
4436
|
+
l("div", Zo, [
|
|
4435
4437
|
A(y, {
|
|
4436
4438
|
variant: "tertiary",
|
|
4437
|
-
label: V(
|
|
4439
|
+
label: V(i)("common.close"),
|
|
4438
4440
|
onClick: f[0] || (f[0] = (c) => r("update:show", !1))
|
|
4439
4441
|
}, null, 8, ["label"])
|
|
4440
4442
|
])
|
|
@@ -4446,15 +4448,15 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4446
4448
|
fn: N(() => {
|
|
4447
4449
|
var c;
|
|
4448
4450
|
return [
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
f[2] || (f[2] =
|
|
4452
|
-
|
|
4451
|
+
l("div", Po, [
|
|
4452
|
+
l("div", Qo, [
|
|
4453
|
+
f[2] || (f[2] = l("div", { class: "fm-typo-en-title-md-600" }, "Data migration (Synergy)", -1)),
|
|
4454
|
+
l("div", Jo, [
|
|
4453
4455
|
A(g, {
|
|
4454
4456
|
name: V(p),
|
|
4455
4457
|
size: "sm"
|
|
4456
4458
|
}, null, 8, ["name"]),
|
|
4457
|
-
|
|
4459
|
+
l("div", Ko, R((c = V(t)._currentLocation) == null ? void 0 : c.name), 1)
|
|
4458
4460
|
])
|
|
4459
4461
|
])
|
|
4460
4462
|
])
|
|
@@ -4472,7 +4474,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4472
4474
|
async function s() {
|
|
4473
4475
|
d.value = !0, console.log("Opening Synergy migration dialog");
|
|
4474
4476
|
}
|
|
4475
|
-
return (
|
|
4477
|
+
return (i, r) => {
|
|
4476
4478
|
const t = F("FmCardSection"), p = F("FmCard");
|
|
4477
4479
|
return V(h).enabledSynergyOpeningMigration && !V(o).businessLevel ? (x(), E(P, { key: 0 }, [
|
|
4478
4480
|
A(p, {
|
|
@@ -4488,14 +4490,14 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4488
4490
|
default: N(() => [
|
|
4489
4491
|
A(t, null, {
|
|
4490
4492
|
default: N(() => r[2] || (r[2] = [
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4493
|
+
l("div", { class: "flex justify-center" }, [
|
|
4494
|
+
l("div", { class: "size-[100px] bg-gray-200 rounded-lg flex items-center justify-center" }, [
|
|
4495
|
+
l("span", { class: "text-lg font-bold text-gray-600" }, "Synergy")
|
|
4494
4496
|
])
|
|
4495
4497
|
], -1),
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4498
|
+
l("div", { class: "flex flex-col items-center gap-2" }, [
|
|
4499
|
+
l("div", { class: "text-lg font-bold" }, "Synergy"),
|
|
4500
|
+
l("div", { class: "text-fm-color-neutral-gray-300" }, "Data migration from Synergy")
|
|
4499
4501
|
], -1)
|
|
4500
4502
|
])),
|
|
4501
4503
|
_: 1
|
|
@@ -4524,7 +4526,7 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4524
4526
|
}, wa = /* @__PURE__ */ Y({
|
|
4525
4527
|
__name: "IntegrationView",
|
|
4526
4528
|
setup(_) {
|
|
4527
|
-
const h = se(), o = L(!1), d = at(), { breakpoints: s } = _e(),
|
|
4529
|
+
const h = se(), o = L(!1), d = at(), { breakpoints: s } = _e(), i = O(() => s.value.xs || s.value.sm), { t: r } = Z();
|
|
4528
4530
|
return ie(async () => {
|
|
4529
4531
|
if (h._currentLocation) {
|
|
4530
4532
|
o.value = !0;
|
|
@@ -4540,12 +4542,12 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4540
4542
|
title: V(r)("inventory.integration.title")
|
|
4541
4543
|
}, {
|
|
4542
4544
|
default: N(() => [
|
|
4543
|
-
|
|
4545
|
+
l("div", {
|
|
4544
4546
|
class: q([
|
|
4545
4547
|
"flex flex-col gap-8 max-h-full",
|
|
4546
4548
|
{
|
|
4547
|
-
"p-0":
|
|
4548
|
-
"px-24 ": !
|
|
4549
|
+
"p-0": i.value,
|
|
4550
|
+
"px-24 ": !i.value
|
|
4549
4551
|
}
|
|
4550
4552
|
])
|
|
4551
4553
|
}, [
|
|
@@ -4556,14 +4558,14 @@ const _o = { class: "flex flex-col gap-4" }, Eo = { class: "flex flex-col" }, No
|
|
|
4556
4558
|
!V(h)._currentLocation || o.value ? (x(), E("div", ea, [
|
|
4557
4559
|
A(S, { size: "lg" })
|
|
4558
4560
|
])) : V(d).enabledIntegrations == 0 ? (x(), E("div", ta, [
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
+
l("div", null, [
|
|
4562
|
+
l("img", {
|
|
4561
4563
|
src: V(qe),
|
|
4562
4564
|
alt: "List is empty"
|
|
4563
4565
|
}, null, 8, na)
|
|
4564
4566
|
]),
|
|
4565
|
-
p[0] || (p[0] =
|
|
4566
|
-
|
|
4567
|
+
p[0] || (p[0] = l("div", { class: "font-bold text-lg" }, "Integration", -1)),
|
|
4568
|
+
l("div", sa, R(V(r)("inventory.integration.description")), 1)
|
|
4567
4569
|
])) : (x(), E("div", oa, [
|
|
4568
4570
|
A(Qs),
|
|
4569
4571
|
A(an),
|