@feedmepos/mf-inventory-portal 1.1.3-dev.3 → 1.1.4
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-D3ktIdhO.js → App-CWly44Cw.js} +1 -1
- package/dist/{ApprovalView-Dk3M-s5h.js → ApprovalView-BvNL_PkW.js} +2 -2
- package/dist/{BindingsDialog-BmXhSgAd.js → BindingsDialog-C1WfUo1d.js} +2 -2
- package/dist/{BindingsPicker-CS7VHxnD.js → BindingsPicker-B9cxaEAQ.js} +1 -1
- package/dist/{BindingsTable-C-8ZbR0L.js → BindingsTable-BIG538-m.js} +1 -1
- package/dist/{ClosingDraftView-U5BIY1rA.js → ClosingDraftView-fxIkO0qv.js} +2 -2
- package/dist/{ClosingTemplateView-JFlvnVpp.js → ClosingTemplateView-tFcvCzUt.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CjWKPoeQ.js → DeliveryOrderPrintPreview-ChCusfMS.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D5BZtCXg.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9nf-Bvv.js} +3 -3
- package/dist/{FmMultiselectDialog-dcCjalMB.js → FmMultiselectDialog-B88ntsa7.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B4Zwubfq.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BXokJA-1.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CJTE5gia.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-SnZRXnGT.js} +1 -1
- package/dist/{IngredientGroupView-YBD2Nzi6.js → IngredientGroupView-BbQJH6wG.js} +2 -2
- package/dist/{IngredientsView-blrQy-Bu.js → IngredientsView-DuRBYR4c.js} +4 -4
- package/dist/{IntegrationView-C1pKuIyX.js → IntegrationView-HWsrefRe.js} +1272 -1210
- package/dist/{InventoryBindingForm-7QLaBlzM.js → InventoryBindingForm-2KEHVzvO.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D_OKoXdH.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Cclzuz1Y.js} +3 -3
- package/dist/{InventoryBindingSummary-B3tc3879.js → InventoryBindingSummary-CWs5HgWm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DNxw33yO.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-rXndajqj.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CzsFEnzT.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVifBu9J.js} +1 -1
- package/dist/{PublishView-CrajUFt0.js → PublishView-P7K2kgWN.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-COKraBcA.js → PurchaseOrderPrintPreview-CDXyqt-T.js} +1 -1
- package/dist/{ReceiveRequestView-CQ6FMWKA.js → ReceiveRequestView-CXxyChNa.js} +9 -9
- package/dist/{RecipeView-Cx_xNvQH.js → RecipeView-DNJypRUA.js} +3 -3
- package/dist/{StockView-BAjMAkxc.js → StockView-gG5rmqtK.js} +6 -6
- package/dist/{SupplierView-Cm-NGi1B.js → SupplierView-3XnnzuU-.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFohejfq.js → TransferDetails.vue_vue_type_script_setup_true_lang-BY0O0xOh.js} +5 -5
- package/dist/{TransferTemplateView-DufbnR3r.js → TransferTemplateView-BqZIeHXq.js} +6 -6
- package/dist/{UnitView-CHYKTvhH.js → UnitView-DVP_J89e.js} +3 -3
- package/dist/{WarehouseView-BJ17oKBn.js → WarehouseView-CrW_FwAy.js} +1 -1
- package/dist/api/netsuite.d.ts +1 -0
- package/dist/{app-Ci0LAaWG.js → app-C94dIU_J.js} +16 -11
- package/dist/app.js +1 -1
- package/dist/{decimal-B1CJmvUi.js → decimal-D0e4N7PE.js} +1 -1
- package/dist/{format-unit-display-CNtdkBZc.js → format-unit-display-DKtx102F.js} +2 -2
- package/dist/{index-Dm0ozpyH.js → index-BxbnRGBe.js} +1 -1
- package/dist/{index-WKMcXjN2.js → index-CSsaj5DD.js} +1 -1
- package/dist/{stock-SX2Kkz7m.js → stock-C5gzau0Q.js} +1 -1
- package/dist/{supplier-CsswP8b4.js → supplier-Dqc19jEh.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B08c6u9d.js → use-ingredient-select-dialog-CNndD6oV.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CbHjVmKL.js → use-inventory-binding-dialog-Df93j5R7.js} +1 -1
- package/dist/views/integration/components/netsuite/TransferOrder.vue.d.ts +48 -0
- package/dist/{vue-i18n-DnrpzaGO.js → vue-i18n-Baz9B8gA.js} +316 -316
- package/package.json +3 -3
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { defineComponent as Y, mergeModels as
|
|
1
|
+
import { defineComponent as Y, mergeModels as Oe, useModel as Se, onMounted as fe, ref as M, computed as z, resolveComponent as E, openBlock as w, createElementBlock as V, createElementVNode as a, toDisplayString as j, unref as I, createVNode as x, createBlock as X, withCtx as R, Fragment as J, renderList as $, normalizeClass as q, normalizeStyle as je, createSlots as oe, createCommentVNode as _, withModifiers as Te, reactive as pe, watch as ve, isRef as se, Teleport as ue, h as D, createTextVNode as Z, watchEffect as ze } from "vue";
|
|
2
2
|
import { E as He } from "./empty-placeholder-wf6-BWE8.js";
|
|
3
|
-
import { aZ as _e, aN as Xe, f as
|
|
4
|
-
import { useDialogChild as Ze, useDialog as
|
|
3
|
+
import { aZ as _e, aN as Xe, f as ee, u as W, a_ as Ue, b as le, j as Qe, aW as ge, al as ye, ay as Ae, a as be, a2 as Ye, Q as P, $ as we, a$ as ke, aE as Be, aR as Ce, s as Ee, y as Fe, a0 as re, c as Le, _ as Je, C as Ke } from "./app-C94dIU_J.js";
|
|
4
|
+
import { useDialogChild as Ze, useDialog as ce, useProxiedModel as ae, useSnackbar as te, useBreakpoints as Ve, components as ne } from "@feedmepos/ui-library";
|
|
5
5
|
import { useI18n as G, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
6
|
-
import { a as qe, b as Ge, c as Pe, u as We } from "./index-
|
|
7
|
-
import { u as de } from "./vue-i18n-
|
|
8
|
-
import { _ as $e, F as et } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { a as qe, b as Ge, c as Pe, u as We } from "./index-CSsaj5DD.js";
|
|
7
|
+
import { u as de } from "./vue-i18n-Baz9B8gA.js";
|
|
8
|
+
import { _ as $e, F as et } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BXokJA-1.js";
|
|
9
9
|
const tt = "data:image/svg+xml,%3csvg%20width='200'%20height='101'%20viewBox='0%200%20200%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M98.9161%2038.4456V24.1772H108.527V27.1988H102.12V30.2202H107.347V32.7382H102.12V38.4456H98.9161Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.382%2031.2276C110.382%2027.5345%20113.249%2024.1772%20117.127%2024.1772C121.174%2024.1772%20123.872%2027.7024%20123.872%2031.3953C123.872%2035.0884%20121.005%2038.6133%20117.127%2038.6133C113.08%2038.4456%20110.382%2034.9204%20110.382%2031.2276ZM117.127%2035.5919C119.487%2035.5919%20120.499%2033.4096%20120.499%2031.2276C120.499%2029.0452%20119.319%2027.0309%20117.127%2027.0309C114.935%2027.0309%20113.754%2029.213%20113.754%2031.2276C113.754%2033.5776%20114.935%2035.5919%20117.127%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M126.232%2031.2276C126.232%2027.5345%20129.099%2024.1772%20132.977%2024.1772C137.024%2024.1772%20139.722%2027.7024%20139.722%2031.3953C139.722%2035.0884%20136.855%2038.6133%20132.977%2038.6133C128.93%2038.4456%20126.232%2034.9204%20126.232%2031.2276ZM132.977%2035.5919C135.337%2035.5919%20136.349%2033.4096%20136.349%2031.2276C136.349%2029.0452%20135.169%2027.0309%20132.977%2027.0309C130.785%2027.0309%20129.604%2029.213%20129.604%2031.2276C129.604%2033.5776%20130.785%2035.5919%20132.977%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M142.926%2038.4455V24.345H148.153C152.874%2024.345%20155.235%2027.5343%20155.235%2031.3952C155.235%2035.5918%20152.368%2038.4455%20148.153%2038.4455H142.926ZM148.153%2027.0308H146.129V35.4238H148.153C150.513%2035.4238%20151.862%2033.5775%20151.862%2031.2272C151.862%2028.8773%20150.513%2027.0308%20148.153%2027.0308Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.045%2057.5607V49.1676L107.009%2055.2107H105.324L102.12%2049.1676V57.5607H98.9161V43.4604H102.457L106.167%2050.8465L109.876%2043.4604H113.417V57.5607H110.045Z'%20fill='%235D5359'/%3e%3cpath%20d='M115.947%2057.5607L121.342%2043.4604H124.04L129.436%2057.5607H125.895L124.715%2054.3716H120.331L119.319%2057.5607H115.947ZM122.691%2046.9856L121.005%2052.1893H124.378L122.691%2046.9856Z'%20fill='%235D5359'/%3e%3cpath%20d='M131.965%2057.5607V43.4604H138.373C141.07%2043.4604%20142.925%2045.8105%20142.925%2048.1605C142.925%2049.8393%20142.082%2051.5179%20140.565%2052.1893L143.768%2057.393H140.059L137.192%2052.8607H135V57.393H131.965V57.5607ZM135.169%2050.175H138.204C139.047%2050.175%20139.553%2049.3356%20139.553%2048.1605C139.553%2046.9856%20138.71%2046.3142%20138.035%2046.3142H135.169V50.175Z'%20fill='%235D5359'/%3e%3cpath%20d='M146.635%2057.5607V43.4604H150.007V49.8393L155.403%2043.4604H158.776L153.548%2049.6713L159.281%2057.5607H155.74L151.693%2051.5179L150.007%2053.3642V57.5607H146.635Z'%20fill='%235D5359'/%3e%3cpath%20d='M171.422%2054.7073V57.5607H161.474V43.4604H171.253V46.3142H164.677V48.9999H170.242V51.6856H164.677V54.7073H171.422Z'%20fill='%235D5359'/%3e%3cpath%20d='M185.417%2046.3142H181.202V57.5607H177.829V46.3142H173.614V43.4604H185.417V46.3142Z'%20fill='%235D5359'/%3e%3cpath%20d='M111.057%2062.5967V76.6973H107.853V70.9898H102.12V76.6973H98.9161V62.5967H102.12V68.1361H107.853V62.5967H111.057Z'%20fill='%235D5359'/%3e%3cpath%20d='M124.04%2069.815V62.5967H127.244V69.815C127.244%2073.6758%20125.389%2076.865%20121.005%2076.865C116.453%2076.865%20114.766%2073.5078%20114.766%2069.815V62.5967H117.97V69.815C117.97%2071.997%20118.813%2074.0115%20121.005%2074.0115C123.366%2074.0115%20124.04%2071.997%20124.04%2069.815Z'%20fill='%235D5359'/%3e%3cpath%20d='M138.036%2076.6973H131.122V62.5967H139.047C141.071%2062.5967%20142.251%2064.4433%20142.251%2066.2898C142.251%2067.6327%20141.576%2068.9755%20140.228%2069.4793C141.914%2069.9827%20142.926%2071.1578%20142.926%2073.1721C142.757%2075.5221%20140.733%2076.6973%20138.036%2076.6973ZM134.326%2065.4504V68.3041H137.53C138.204%2068.3041%20138.879%2067.8004%20138.879%2066.7933C138.879%2065.7861%20138.373%2065.2827%20137.698%2065.2827H134.326V65.4504ZM138.204%2070.8221H134.494V73.8435H138.204C139.047%2073.8435%20139.722%2073.1721%20139.722%2072.3327C139.553%2071.6613%20138.879%2070.8221%20138.204%2070.8221Z'%20fill='%235D5359'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M73.4753%2051.4994C78.7281%2050.5396%2082.8911%2046.4891%2083.9954%2041.3137L84.1232%2040.7134L83.9445%2040.1256C80.5804%2029.066%2071.9945%2020.2704%2061.0373%2016.5726C57.4%2015.3451%2053.5046%2014.6804%2049.458%2014.6804C45.4112%2014.6804%2041.5158%2015.3451%2037.8784%2016.5726C26.9214%2020.2704%2018.3354%2029.066%2014.9712%2040.1256L14.7924%2040.7134L14.9206%2041.3137C16.0247%2046.4891%2020.1875%2050.5396%2025.4405%2051.4994V58.8839H14.4183C14.6758%2059.9557%2014.9818%2061.0088%2015.3337%2062.0411C20.1553%2076.1811%2033.6083%2086.3619%2049.458%2086.3619C65.3074%2086.3619%2078.7606%2076.1811%2083.5822%2062.0411C83.9342%2061.0088%2084.2399%2059.9557%2084.4974%2058.8839H73.4753V51.4994ZM41.0517%2020.5973V38.5742C41.0517%2043.1931%2044.8155%2046.9371%2049.458%2046.9371C54.1005%2046.9371%2057.8641%2043.1931%2057.8641%2038.5742V20.5973C55.1919%2019.856%2052.3732%2019.4592%2049.458%2019.4592C46.5428%2019.4592%2043.7241%2019.856%2041.0517%2020.5973ZM62.6675%2022.3673V38.5742C62.6675%2043.1931%2066.431%2046.9371%2071.0735%2046.9371C74.9051%2046.9371%2078.1425%2044.3848%2079.1528%2040.8942C76.4672%2032.6902%2070.4379%2025.9824%2062.6675%2022.3673ZM60.2658%2046.1322C57.8753%2049.5094%2053.9255%2051.7159%2049.458%2051.7159C44.9902%2051.7159%2041.0408%2049.5094%2038.65%2046.1322C36.6982%2048.8894%2033.7074%2050.8662%2030.2439%2051.4994V58.8839H68.6718V51.4994C65.2083%2050.8662%2062.2175%2048.8894%2060.2658%2046.1322ZM21.1583%2063.6628C26.1349%2074.2514%2036.9382%2081.5834%2049.458%2081.5834C61.9776%2081.5834%2072.781%2074.2514%2077.7574%2063.6628H21.1583ZM36.2482%2038.5742V22.3673C28.4779%2025.9824%2022.4486%2032.6902%2019.7631%2040.8942C20.7733%2044.3848%2024.0106%2046.9371%2027.8422%2046.9371C32.4847%2046.9371%2036.2482%2043.1931%2036.2482%2038.5742Z'%20fill='%23FFC35D'/%3e%3c/svg%3e";
|
|
10
10
|
var Ne = { exports: {} };
|
|
11
|
-
(function(F,
|
|
11
|
+
(function(F, g) {
|
|
12
12
|
(function() {
|
|
13
13
|
var s = {};
|
|
14
|
-
F.exports = s, s.simpleFilter = function(
|
|
14
|
+
F.exports = s, s.simpleFilter = function(i, n) {
|
|
15
15
|
return n.filter(function(t) {
|
|
16
|
-
return s.test(
|
|
16
|
+
return s.test(i, t);
|
|
17
17
|
});
|
|
18
|
-
}, s.test = function(
|
|
19
|
-
return s.match(
|
|
20
|
-
}, s.match = function(
|
|
18
|
+
}, s.test = function(i, n) {
|
|
19
|
+
return s.match(i, n) !== null;
|
|
20
|
+
}, s.match = function(i, n, t) {
|
|
21
21
|
t = t || {};
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
for (var
|
|
25
|
-
C = n[
|
|
26
|
-
return
|
|
27
|
-
}, s.filter = function(
|
|
28
|
-
return !n || n.length === 0 ? [] : typeof
|
|
29
|
-
var
|
|
30
|
-
t.extract && (
|
|
31
|
-
var l = s.match(
|
|
32
|
-
return l != null && (
|
|
22
|
+
var u = 0, b = [], S = n.length, y = 0, v = 0, l = t.pre || "", r = t.post || "", h = t.caseSensitive && n || n.toLowerCase(), C;
|
|
23
|
+
i = t.caseSensitive && i || i.toLowerCase();
|
|
24
|
+
for (var k = 0; k < S; k++)
|
|
25
|
+
C = n[k], h[k] === i[u] ? (C = l + C + r, u += 1, v += 1 + v) : v = 0, y += v, b[b.length] = C;
|
|
26
|
+
return u === i.length ? (y = h === i ? 1 / 0 : y, { rendered: b.join(""), score: y }) : null;
|
|
27
|
+
}, s.filter = function(i, n, t) {
|
|
28
|
+
return !n || n.length === 0 ? [] : typeof i != "string" ? n : (t = t || {}, n.reduce(function(u, b, S, y) {
|
|
29
|
+
var v = b;
|
|
30
|
+
t.extract && (v = t.extract(b));
|
|
31
|
+
var l = s.match(i, v, t);
|
|
32
|
+
return l != null && (u[u.length] = {
|
|
33
33
|
string: l.rendered,
|
|
34
34
|
score: l.score,
|
|
35
|
-
index:
|
|
36
|
-
original:
|
|
37
|
-
}),
|
|
38
|
-
}, []).sort(function(
|
|
39
|
-
var
|
|
40
|
-
return
|
|
35
|
+
index: S,
|
|
36
|
+
original: b
|
|
37
|
+
}), u;
|
|
38
|
+
}, []).sort(function(u, b) {
|
|
39
|
+
var S = b.score - u.score;
|
|
40
|
+
return S || u.index - b.index;
|
|
41
41
|
}));
|
|
42
42
|
};
|
|
43
43
|
})();
|
|
44
44
|
})(Ne);
|
|
45
45
|
var nt = Ne.exports;
|
|
46
|
-
const
|
|
47
|
-
function
|
|
48
|
-
return
|
|
46
|
+
const De = /* @__PURE__ */ _e(nt);
|
|
47
|
+
function he(F, g) {
|
|
48
|
+
return De.filter(F, g).length > 0;
|
|
49
49
|
}
|
|
50
|
-
function ot(F,
|
|
50
|
+
function ot(F, g) {
|
|
51
51
|
if (!F)
|
|
52
52
|
return {
|
|
53
|
-
label:
|
|
53
|
+
label: g,
|
|
54
54
|
segments: [
|
|
55
55
|
{
|
|
56
56
|
isMatch: !1,
|
|
57
|
-
segment:
|
|
57
|
+
segment: g
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
matched: !1
|
|
61
61
|
};
|
|
62
|
-
const [s] =
|
|
62
|
+
const [s] = De.filter(F.toLocaleLowerCase(), [g], {
|
|
63
63
|
pre: "|",
|
|
64
64
|
post: "|"
|
|
65
65
|
});
|
|
66
66
|
if (!s)
|
|
67
67
|
return {
|
|
68
|
-
label:
|
|
69
|
-
segments: [{ segment:
|
|
68
|
+
label: g,
|
|
69
|
+
segments: [{ segment: g, isMatch: !1 }],
|
|
70
70
|
matched: !1
|
|
71
71
|
};
|
|
72
|
-
const
|
|
72
|
+
const i = s.string.toString().replace(/\|\|/g, "").split("|").reduce((n, t, u) => (n.push({
|
|
73
73
|
segment: t,
|
|
74
|
-
isMatch:
|
|
74
|
+
isMatch: u % 2 !== 0
|
|
75
75
|
//e.g. index 1, 3, 5, ...
|
|
76
76
|
}), n), new Array());
|
|
77
77
|
return {
|
|
78
|
-
label:
|
|
79
|
-
segments:
|
|
78
|
+
label: g,
|
|
79
|
+
segments: i,
|
|
80
80
|
matched: !0
|
|
81
81
|
};
|
|
82
82
|
}
|
|
@@ -89,12 +89,12 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
89
89
|
}, it = {
|
|
90
90
|
class: "flex-1",
|
|
91
91
|
"data-cy": "filter-field"
|
|
92
|
-
}, rt = ["data-cy"], ut = { class: "flex flex-col" },
|
|
92
|
+
}, rt = ["data-cy"], ut = { class: "flex flex-col" }, ct = { class: "fm-typo-en-body-md-400" }, dt = {
|
|
93
93
|
key: 1,
|
|
94
94
|
class: "w-full py-16 text-fm-color-typo-disabled fm-typo-en-body-md-400 text-center"
|
|
95
|
-
},
|
|
95
|
+
}, Re = /* @__PURE__ */ Y({
|
|
96
96
|
__name: "FmNestedMultiselectDialog",
|
|
97
|
-
props: /* @__PURE__ */
|
|
97
|
+
props: /* @__PURE__ */ Oe({
|
|
98
98
|
modelValue: {}
|
|
99
99
|
}, {
|
|
100
100
|
modelValue: {},
|
|
@@ -102,36 +102,36 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
102
102
|
}),
|
|
103
103
|
emits: ["update:modelValue"],
|
|
104
104
|
setup(F) {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
s.emitData(
|
|
105
|
+
const g = Se(F, "modelValue"), s = Ze();
|
|
106
|
+
fe(() => {
|
|
107
|
+
s.emitData(g.value);
|
|
108
108
|
});
|
|
109
|
-
const
|
|
109
|
+
const i = M(""), { t: n } = G();
|
|
110
110
|
function t(e) {
|
|
111
|
-
return
|
|
112
|
-
|
|
111
|
+
return he(
|
|
112
|
+
i.value,
|
|
113
113
|
e.sublabel ? [e.label, e.sublabel] : [e.label]
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return t(e) ? !0 : K(e) ? e.children.some(
|
|
116
|
+
function u(e) {
|
|
117
|
+
return t(e) ? !0 : K(e) ? e.children.some(u) : !1;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
if (!
|
|
119
|
+
function b(e, o) {
|
|
120
|
+
if (!i.value)
|
|
121
121
|
return !0;
|
|
122
122
|
const [B, ...L] = e;
|
|
123
123
|
if (typeof B != "number")
|
|
124
124
|
return !1;
|
|
125
|
-
const
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
) ? !0 : L.length === 0 ?
|
|
125
|
+
const N = o[B];
|
|
126
|
+
return he(
|
|
127
|
+
i.value,
|
|
128
|
+
N.sublabel ? [N.label, N.sublabel] : [N.label]
|
|
129
|
+
) ? !0 : L.length === 0 ? u(N) : K(N) ? b(L, N.children) : !1;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function S(e, o, B = 0, L = !1) {
|
|
132
132
|
if (K(e) && e.children.length) {
|
|
133
|
-
const { children:
|
|
134
|
-
(
|
|
133
|
+
const { children: N, ...H } = e, U = N.flatMap(
|
|
134
|
+
(O, T) => S(O, [...o, T], B + 1, L || e.disabled)
|
|
135
135
|
);
|
|
136
136
|
return [
|
|
137
137
|
{
|
|
@@ -154,16 +154,16 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
154
154
|
}
|
|
155
155
|
];
|
|
156
156
|
}
|
|
157
|
-
const
|
|
158
|
-
(e, o) =>
|
|
157
|
+
const y = z(() => g.value.flatMap(
|
|
158
|
+
(e, o) => S(e, [o]).filter((B) => b(B.keys, g.value))
|
|
159
159
|
));
|
|
160
|
-
function
|
|
160
|
+
function v(e) {
|
|
161
161
|
if (K(e)) {
|
|
162
|
-
if (
|
|
163
|
-
const o = t(e) ? e.children : e.children.filter(
|
|
164
|
-
return o.length === 0 ? !1 : o.every(
|
|
162
|
+
if (u(e)) {
|
|
163
|
+
const o = t(e) ? e.children : e.children.filter(u);
|
|
164
|
+
return o.length === 0 ? !1 : o.every(v);
|
|
165
165
|
}
|
|
166
|
-
return e.children.every(
|
|
166
|
+
return e.children.every(v);
|
|
167
167
|
}
|
|
168
168
|
return e.active ?? !1;
|
|
169
169
|
}
|
|
@@ -171,32 +171,32 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
171
171
|
const [B, ...L] = e;
|
|
172
172
|
if (typeof B != "number")
|
|
173
173
|
return !1;
|
|
174
|
-
const
|
|
175
|
-
return L.length === 0 ?
|
|
174
|
+
const N = o[B];
|
|
175
|
+
return L.length === 0 ? v(N ?? []) : K(N) ? l(L, N.children ?? []) : !1;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function r(e) {
|
|
178
178
|
if (K(e)) {
|
|
179
|
-
if (
|
|
180
|
-
const o = t(e) ? e.children : e.children.filter(
|
|
181
|
-
return o.length === 0 ? !1 : o.some(
|
|
179
|
+
if (u(e)) {
|
|
180
|
+
const o = t(e) ? e.children : e.children.filter(u);
|
|
181
|
+
return o.length === 0 ? !1 : o.some(v) && !o.every(v);
|
|
182
182
|
}
|
|
183
183
|
return !1;
|
|
184
184
|
}
|
|
185
185
|
return !1;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function h(e, o) {
|
|
188
188
|
const [B, ...L] = e;
|
|
189
189
|
if (typeof B != "number")
|
|
190
190
|
return !1;
|
|
191
|
-
const
|
|
192
|
-
return L.length === 0 ?
|
|
191
|
+
const N = o[B];
|
|
192
|
+
return L.length === 0 ? r(N ?? []) : K(N) ? h(L, (N == null ? void 0 : N.children) ?? []) : !1;
|
|
193
193
|
}
|
|
194
194
|
function C(e, o) {
|
|
195
195
|
if (e.disabled)
|
|
196
196
|
return e;
|
|
197
197
|
if (K(e)) {
|
|
198
|
-
if (
|
|
199
|
-
const B = t(e) ? e.children : e.children.filter(
|
|
198
|
+
if (u(e)) {
|
|
199
|
+
const B = t(e) ? e.children : e.children.filter(u);
|
|
200
200
|
return {
|
|
201
201
|
...e,
|
|
202
202
|
children: e.children.map((L) => B.find((H) => Xe(H.value, L.value)) ? C(L, o) : L)
|
|
@@ -212,111 +212,111 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
212
212
|
active: o
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
const [L, ...
|
|
217
|
-
return typeof L != "number" ? o :
|
|
215
|
+
function k(e, o, B) {
|
|
216
|
+
const [L, ...N] = e;
|
|
217
|
+
return typeof L != "number" ? o : N.length === 0 ? o.map((H, U) => L !== U ? H : C(H, B)) : o.map(
|
|
218
218
|
(H, U) => L === U && K(H) ? {
|
|
219
219
|
...H,
|
|
220
|
-
children:
|
|
220
|
+
children: k(N, H.children, B)
|
|
221
221
|
} : H
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
const p =
|
|
224
|
+
const p = M(new Array());
|
|
225
225
|
function m(e) {
|
|
226
226
|
const o = e.join();
|
|
227
227
|
return p.value.find((B) => o === B);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function d(e) {
|
|
230
230
|
const o = e.join();
|
|
231
231
|
m(e) ? p.value = p.value.filter((B) => B !== o) : p.value = [...p.value, o];
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function c(e) {
|
|
234
234
|
const o = e.join();
|
|
235
235
|
return p.value.find((B) => o.startsWith(B) && o !== B);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
() =>
|
|
237
|
+
const A = z(
|
|
238
|
+
() => y.value.filter((e) => b(e.keys, g.value) && e.active).length
|
|
239
239
|
);
|
|
240
240
|
function f(e, o, B) {
|
|
241
|
-
|
|
241
|
+
g.value = k(e, o, B), s.emitData(g.value);
|
|
242
242
|
}
|
|
243
243
|
return (e, o) => {
|
|
244
|
-
const B = E("FmSearch"), L = E("FmCheckbox"),
|
|
245
|
-
return w(),
|
|
244
|
+
const B = E("FmSearch"), L = E("FmCheckbox"), N = E("FmButton"), H = E("FmListItem"), U = E("FmList");
|
|
245
|
+
return w(), V("div", st, [
|
|
246
246
|
a("div", at, [
|
|
247
|
-
a("div", lt,
|
|
247
|
+
a("div", lt, j(I(n)("inventory.formField.itemsSelected", { count: A.value })), 1),
|
|
248
248
|
a("div", it, [
|
|
249
|
-
|
|
250
|
-
modelValue:
|
|
251
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
252
|
-
placeholder:
|
|
249
|
+
x(B, {
|
|
250
|
+
modelValue: i.value,
|
|
251
|
+
"onUpdate:modelValue": o[0] || (o[0] = (O) => i.value = O),
|
|
252
|
+
placeholder: I(n)("inventory.formField.filterItems")
|
|
253
253
|
}, null, 8, ["modelValue", "placeholder"])
|
|
254
254
|
])
|
|
255
255
|
]),
|
|
256
|
-
|
|
256
|
+
y.value.length ? (w(), X(U, {
|
|
257
257
|
key: 0,
|
|
258
258
|
class: "flex-1 overflow-y-auto"
|
|
259
259
|
}, {
|
|
260
|
-
default:
|
|
261
|
-
(w(!0),
|
|
262
|
-
key:
|
|
260
|
+
default: R(() => [
|
|
261
|
+
(w(!0), V(J, null, $(y.value, (O) => (w(), V("div", {
|
|
262
|
+
key: O.keys.join(),
|
|
263
263
|
class: q([
|
|
264
264
|
"transition-all overflow-y-clip",
|
|
265
|
-
|
|
265
|
+
c(O.keys) ? "max-h-0 opacity-0" : "max-h-[50px] opacity-100"
|
|
266
266
|
]),
|
|
267
|
-
"data-cy": `nested-${
|
|
267
|
+
"data-cy": `nested-${O.keys.join("-")}-${O.label}`
|
|
268
268
|
}, [
|
|
269
|
-
|
|
270
|
-
clickable:
|
|
271
|
-
onClick: () =>
|
|
272
|
-
style:
|
|
273
|
-
paddingLeft: `${16 +
|
|
269
|
+
x(H, {
|
|
270
|
+
clickable: O.selectable !== !1,
|
|
271
|
+
onClick: () => O.selectable === !1 || O.disabled || f(O.keys, g.value, !l(O.keys, g.value)),
|
|
272
|
+
style: je({
|
|
273
|
+
paddingLeft: `${16 + O.indent * 16}px`,
|
|
274
274
|
paddingTop: "4px",
|
|
275
275
|
paddingBottom: "4px"
|
|
276
276
|
}),
|
|
277
|
-
disabled:
|
|
277
|
+
disabled: O.selectable !== !1 && O.disabled
|
|
278
278
|
}, oe({
|
|
279
|
-
default:
|
|
279
|
+
default: R(() => [
|
|
280
280
|
a("div", ut, [
|
|
281
|
-
a("div",
|
|
282
|
-
(w(!0),
|
|
281
|
+
a("div", ct, [
|
|
282
|
+
(w(!0), V(J, null, $(I(ot)(i.value, O.label).segments, (T, Q) => (w(), V("span", {
|
|
283
283
|
key: Q,
|
|
284
284
|
class: q({
|
|
285
|
-
"font-bold":
|
|
285
|
+
"font-bold": T.isMatch
|
|
286
286
|
})
|
|
287
|
-
}, T
|
|
287
|
+
}, j(T.segment), 3))), 128))
|
|
288
288
|
]),
|
|
289
|
-
|
|
289
|
+
O.sublabel ? (w(), V("div", {
|
|
290
290
|
key: 0,
|
|
291
291
|
class: q([
|
|
292
292
|
"fm-typo-en-body-sm-400",
|
|
293
|
-
|
|
293
|
+
O.disabled ? "" : "text-fm-color-typo-secondary"
|
|
294
294
|
])
|
|
295
|
-
},
|
|
295
|
+
}, j(O.sublabel), 3)) : _("", !0)
|
|
296
296
|
])
|
|
297
297
|
]),
|
|
298
298
|
_: 2
|
|
299
299
|
}, [
|
|
300
|
-
|
|
300
|
+
O.selectable !== !1 ? {
|
|
301
301
|
name: "prepend",
|
|
302
|
-
fn:
|
|
303
|
-
|
|
304
|
-
disabled:
|
|
305
|
-
"model-value": l(
|
|
306
|
-
value:
|
|
307
|
-
indeterminate:
|
|
302
|
+
fn: R(() => [
|
|
303
|
+
x(L, {
|
|
304
|
+
disabled: O.disabled,
|
|
305
|
+
"model-value": l(O.keys, g.value),
|
|
306
|
+
value: O.keys,
|
|
307
|
+
indeterminate: h(O.keys, g.value)
|
|
308
308
|
}, null, 8, ["disabled", "model-value", "value", "indeterminate"])
|
|
309
309
|
]),
|
|
310
310
|
key: "0"
|
|
311
311
|
} : void 0,
|
|
312
|
-
|
|
312
|
+
O.collapsible ? {
|
|
313
313
|
name: "append",
|
|
314
|
-
fn:
|
|
315
|
-
|
|
316
|
-
"prepend-icon": m(
|
|
314
|
+
fn: R(() => [
|
|
315
|
+
x(N, {
|
|
316
|
+
"prepend-icon": m(O.keys) ? "expand_less" : "expand_more",
|
|
317
317
|
size: "md",
|
|
318
318
|
variant: "tertiary",
|
|
319
|
-
onClick: Te(() =>
|
|
319
|
+
onClick: Te(() => d(O.keys), ["stop"])
|
|
320
320
|
}, null, 8, ["prepend-icon", "onClick"])
|
|
321
321
|
]),
|
|
322
322
|
key: "1"
|
|
@@ -325,7 +325,7 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
325
325
|
], 10, rt))), 128))
|
|
326
326
|
]),
|
|
327
327
|
_: 1
|
|
328
|
-
})) : (w(),
|
|
328
|
+
})) : (w(), V("div", dt, j(I(n)("inventory.formField.noItemsFound")), 1))
|
|
329
329
|
]);
|
|
330
330
|
};
|
|
331
331
|
}
|
|
@@ -335,7 +335,7 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
335
335
|
}, gt = { class: "text-left" }, yt = { class: "min-w-64" }, At = { class: "flex flex-col" }, bt = { class: "fm-typo-en-body-md-400" }, ht = {
|
|
336
336
|
key: 0,
|
|
337
337
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
338
|
-
},
|
|
338
|
+
}, xt = { class: "w-1" }, It = /* @__PURE__ */ Y({
|
|
339
339
|
__name: "ApplyAddon",
|
|
340
340
|
props: {
|
|
341
341
|
groups: {
|
|
@@ -355,146 +355,146 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
355
355
|
}
|
|
356
356
|
},
|
|
357
357
|
emits: ["update:modifiers"],
|
|
358
|
-
setup(F, { emit:
|
|
359
|
-
const s = F,
|
|
360
|
-
const l = s.groups.flatMap((
|
|
361
|
-
const C = s.items.find((
|
|
358
|
+
setup(F, { emit: g }) {
|
|
359
|
+
const s = F, i = g, n = ce(), t = z(() => {
|
|
360
|
+
const l = s.groups.flatMap((r) => r.items.map((h) => {
|
|
361
|
+
const C = s.items.find((k) => k._id === h._id);
|
|
362
362
|
return {
|
|
363
|
-
...
|
|
364
|
-
groupName:
|
|
365
|
-
name:
|
|
363
|
+
...h,
|
|
364
|
+
groupName: r.name,
|
|
365
|
+
name: h.name ?? (C == null ? void 0 : C.name) ?? "-"
|
|
366
366
|
};
|
|
367
367
|
}));
|
|
368
|
-
return s.modifiers.map((
|
|
369
|
-
const
|
|
368
|
+
return s.modifiers.map((r) => {
|
|
369
|
+
const h = l.find((p) => p.selection === r.selection), C = (h == null ? void 0 : h.name) ?? "-", k = (h == null ? void 0 : h.groupName) ?? "";
|
|
370
370
|
return {
|
|
371
|
-
...
|
|
371
|
+
...r,
|
|
372
372
|
name: C,
|
|
373
|
-
groupName:
|
|
373
|
+
groupName: k
|
|
374
374
|
};
|
|
375
375
|
});
|
|
376
|
-
}),
|
|
377
|
-
function
|
|
378
|
-
|
|
376
|
+
}), u = z(() => s.groups.flatMap((l) => l.items.map((r) => ({ ...r, groupId: l._id }))));
|
|
377
|
+
function b({ selection: l }) {
|
|
378
|
+
i(
|
|
379
379
|
"update:modifiers",
|
|
380
|
-
s.modifiers.filter((
|
|
380
|
+
s.modifiers.filter((r) => r.selection !== l)
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
const
|
|
385
|
-
|
|
383
|
+
function S({ selection: l }, r) {
|
|
384
|
+
const h = s.modifiers.find((C) => C.selection === l);
|
|
385
|
+
h && (h.code = r);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function y() {
|
|
388
388
|
let l = [];
|
|
389
|
-
s.groups.forEach((
|
|
389
|
+
s.groups.forEach((h) => {
|
|
390
390
|
let C = !1;
|
|
391
|
-
|
|
392
|
-
label:
|
|
391
|
+
h.items.every((k) => k._id.startsWith("item")) && (C = !0), l.push({
|
|
392
|
+
label: h.name,
|
|
393
393
|
sublabel: "Group",
|
|
394
|
-
value:
|
|
394
|
+
value: h._id,
|
|
395
395
|
disabled: C,
|
|
396
|
-
children:
|
|
397
|
-
var
|
|
398
|
-
const m = s.items.find((
|
|
399
|
-
(
|
|
396
|
+
children: h.items.reduce((k, p) => {
|
|
397
|
+
var c;
|
|
398
|
+
const m = s.items.find((A) => A._id === p._id), d = (c = m == null ? void 0 : m.variant) == null ? void 0 : c.variantCombinations.find(
|
|
399
|
+
(A) => A.combinationKey === (p == null ? void 0 : p.combinationKey)
|
|
400
400
|
);
|
|
401
401
|
return [
|
|
402
|
-
...
|
|
402
|
+
...k,
|
|
403
403
|
{
|
|
404
|
-
label: `${p.name ?? (m == null ? void 0 : m.name)} ${
|
|
405
|
-
value: `${p.selection}${
|
|
404
|
+
label: `${p.name ?? (m == null ? void 0 : m.name)} ${d ? `(${d.name})` : ""}`,
|
|
405
|
+
value: `${p.selection}${d ? `/${d == null ? void 0 : d.combinationKey}` : ""}`,
|
|
406
406
|
disabled: C,
|
|
407
|
-
active: !!s.modifiers.find(({ selection:
|
|
407
|
+
active: !!s.modifiers.find(({ selection: A }) => A === p.selection)
|
|
408
408
|
}
|
|
409
409
|
];
|
|
410
410
|
}, [])
|
|
411
411
|
});
|
|
412
412
|
});
|
|
413
|
-
const
|
|
413
|
+
const r = {
|
|
414
414
|
modelValue: l
|
|
415
415
|
};
|
|
416
416
|
n.open({
|
|
417
417
|
title: "Select Addons",
|
|
418
|
-
contentComponent:
|
|
419
|
-
contentComponentProps:
|
|
418
|
+
contentComponent: Re,
|
|
419
|
+
contentComponentProps: r,
|
|
420
420
|
primaryActions: {
|
|
421
421
|
text: "Confirm",
|
|
422
422
|
close: !0
|
|
423
423
|
}
|
|
424
|
-
}).onPrimary((
|
|
425
|
-
const C =
|
|
426
|
-
let
|
|
427
|
-
function p(m,
|
|
428
|
-
if (
|
|
429
|
-
for (let
|
|
430
|
-
p(
|
|
424
|
+
}).onPrimary((h) => {
|
|
425
|
+
const C = ee(s.modifiers);
|
|
426
|
+
let k = [];
|
|
427
|
+
function p(m, d) {
|
|
428
|
+
if (d(m), K(m))
|
|
429
|
+
for (let c of m.children)
|
|
430
|
+
p(c, d);
|
|
431
431
|
}
|
|
432
|
-
|
|
433
|
-
p(m, (
|
|
432
|
+
h.forEach((m) => {
|
|
433
|
+
p(m, (d) => {
|
|
434
434
|
var e;
|
|
435
|
-
if (s.groups.find(({ _id: o }) => o ===
|
|
436
|
-
const
|
|
437
|
-
!K(
|
|
438
|
-
addonGroupId: (
|
|
439
|
-
selection:
|
|
440
|
-
code: ((e = C.find(({ selection: o }) =>
|
|
435
|
+
if (s.groups.find(({ _id: o }) => o === d.value)) return;
|
|
436
|
+
const A = u.value.find(({ selection: o }) => o === d.value), f = k.find(({ selection: o }) => d.value === o);
|
|
437
|
+
!K(d) && d.active && f === void 0 && k.push({
|
|
438
|
+
addonGroupId: (A == null ? void 0 : A.groupId) ?? "",
|
|
439
|
+
selection: d.value,
|
|
440
|
+
code: ((e = C.find(({ selection: o }) => d.value === o)) == null ? void 0 : e.code) ?? ""
|
|
441
441
|
});
|
|
442
442
|
});
|
|
443
|
-
}),
|
|
443
|
+
}), i("update:modifiers", k);
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
const { t:
|
|
447
|
-
return (l,
|
|
448
|
-
const
|
|
449
|
-
return w(),
|
|
446
|
+
const { t: v } = G();
|
|
447
|
+
return (l, r) => {
|
|
448
|
+
const h = E("FmButton"), C = E("FmTextField");
|
|
449
|
+
return w(), V("div", mt, [
|
|
450
450
|
a("div", ft, [
|
|
451
|
-
a("div", pt,
|
|
452
|
-
|
|
451
|
+
a("div", pt, j(I(v)("inventory.integration.apply.addons")), 1),
|
|
452
|
+
x(h, {
|
|
453
453
|
type: "button",
|
|
454
454
|
variant: "plain",
|
|
455
455
|
size: "md",
|
|
456
456
|
icon: "link",
|
|
457
|
-
label:
|
|
458
|
-
onClick:
|
|
457
|
+
label: I(v)("inventory.integration.apply.applyAddon"),
|
|
458
|
+
onClick: r[0] || (r[0] = (k) => y())
|
|
459
459
|
}, null, 8, ["label"])
|
|
460
460
|
]),
|
|
461
461
|
a("div", null, [
|
|
462
|
-
t.value.length > 0 ? (w(),
|
|
462
|
+
t.value.length > 0 ? (w(), V("table", vt, [
|
|
463
463
|
a("tr", gt, [
|
|
464
|
-
a("th", yt,
|
|
465
|
-
a("th", null,
|
|
466
|
-
|
|
464
|
+
a("th", yt, j(I(v)("inventory.integration.apply.name")), 1),
|
|
465
|
+
a("th", null, j(I(v)("inventory.integration.apply.code")), 1),
|
|
466
|
+
r[1] || (r[1] = a("th", { class: "w-1" }, " ", -1))
|
|
467
467
|
]),
|
|
468
|
-
(w(!0),
|
|
469
|
-
|
|
468
|
+
(w(!0), V(J, null, $(t.value, (k, p) => (w(), V(J, { key: p }, [
|
|
469
|
+
r[2] || (r[2] = a("tr", { class: "block h-8" }, null, -1)),
|
|
470
470
|
a("tr", null, [
|
|
471
471
|
a("td", null, [
|
|
472
472
|
a("div", At, [
|
|
473
|
-
a("div", bt,
|
|
474
|
-
|
|
473
|
+
a("div", bt, j(k.name), 1),
|
|
474
|
+
k.groupName ? (w(), V("div", ht, j(k.groupName), 1)) : _("", !0)
|
|
475
475
|
])
|
|
476
476
|
]),
|
|
477
477
|
a("td", null, [
|
|
478
|
-
|
|
478
|
+
x(C, {
|
|
479
479
|
disabled: F.loading,
|
|
480
|
-
"model-value":
|
|
481
|
-
"onUpdate:modelValue": [(m) =>
|
|
480
|
+
"model-value": k.code,
|
|
481
|
+
"onUpdate:modelValue": [(m) => k.code = m, (m) => S(k, m)],
|
|
482
482
|
rules: [
|
|
483
|
-
function(
|
|
484
|
-
return !!
|
|
483
|
+
function(d) {
|
|
484
|
+
return !!d || "Required";
|
|
485
485
|
}
|
|
486
486
|
]
|
|
487
487
|
}, null, 8, ["disabled", "model-value", "onUpdate:modelValue", "rules"])
|
|
488
488
|
]),
|
|
489
|
-
a("td",
|
|
490
|
-
|
|
489
|
+
a("td", xt, [
|
|
490
|
+
x(h, {
|
|
491
491
|
disabled: F.loading,
|
|
492
492
|
type: "button",
|
|
493
493
|
variant: "tertiary",
|
|
494
494
|
icon: "delete",
|
|
495
495
|
"icon-color": "#000000",
|
|
496
496
|
size: "md",
|
|
497
|
-
onClick: (m) =>
|
|
497
|
+
onClick: (m) => b(k)
|
|
498
498
|
}, null, 8, ["disabled", "onClick"])
|
|
499
499
|
])
|
|
500
500
|
])
|
|
@@ -505,74 +505,74 @@ const st = { class: "flex flex-col gap-12 h-[350px]" }, at = { class: "flex item
|
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
|
-
function St(F,
|
|
509
|
-
const s =
|
|
508
|
+
function St(F, g = []) {
|
|
509
|
+
const s = g.map((n) => F.find((t) => t._id === n)).filter((n) => !!n);
|
|
510
510
|
return kt(s).reduce((n, t) => (n[t.combinationKey] = t.selectionName.join(" / "), n), {});
|
|
511
511
|
}
|
|
512
|
-
function wt(F,
|
|
513
|
-
const
|
|
514
|
-
var
|
|
515
|
-
const
|
|
516
|
-
...
|
|
517
|
-
codeName: [
|
|
512
|
+
function wt(F, g, s) {
|
|
513
|
+
const i = s.reduce((t, u) => {
|
|
514
|
+
var v, l, r;
|
|
515
|
+
const b = u.category || "", S = St(g, (v = u.variant) == null ? void 0 : v.variantGroupIds), y = {
|
|
516
|
+
...u,
|
|
517
|
+
codeName: [u.code, u.name].filter((h) => !!h).join(" "),
|
|
518
518
|
variant: {
|
|
519
|
-
variantGroupIds: ((l =
|
|
520
|
-
variantCombinations: (((
|
|
521
|
-
const C =
|
|
519
|
+
variantGroupIds: ((l = u.variant) == null ? void 0 : l.variantGroupIds) || [],
|
|
520
|
+
variantCombinations: (((r = u.variant) == null ? void 0 : r.variantCombinations) || []).map((h) => {
|
|
521
|
+
const C = h.code, k = h.name || S[h.combinationKey || ""];
|
|
522
522
|
return {
|
|
523
|
-
...
|
|
524
|
-
codeName: [C,
|
|
523
|
+
...h,
|
|
524
|
+
codeName: [C, k].filter((p) => !!p).join(" ").trim() || "-"
|
|
525
525
|
};
|
|
526
526
|
})
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
|
-
return t[
|
|
530
|
-
}, {}), n = Object.values(
|
|
529
|
+
return t[b] = t[b] ? [...t[b], y] : [y], t;
|
|
530
|
+
}, {}), n = Object.values(i)[0];
|
|
531
531
|
return F.length === 0 && n ? n.map((t) => ({
|
|
532
532
|
id: t._id,
|
|
533
533
|
name: t.name ?? "",
|
|
534
|
-
items:
|
|
534
|
+
items: i[t._id || ""] || []
|
|
535
535
|
})) || [] : F.map((t) => ({
|
|
536
536
|
id: t._id,
|
|
537
537
|
name: t.name ?? "",
|
|
538
|
-
items:
|
|
538
|
+
items: i[t._id || ""] || []
|
|
539
539
|
}));
|
|
540
540
|
}
|
|
541
|
-
function Me(F,
|
|
541
|
+
function Me(F, g) {
|
|
542
542
|
if (F.length == 1)
|
|
543
543
|
return F[0];
|
|
544
|
-
const s = F[0],
|
|
545
|
-
return s.reduce((
|
|
544
|
+
const s = F[0], i = F.slice(1, F.length), n = Me(i, g);
|
|
545
|
+
return s.reduce((u, b) => [...u, ...n.map((S) => g(b, S))], new Array());
|
|
546
546
|
}
|
|
547
547
|
function kt(F) {
|
|
548
548
|
if (F.length === 0) return [];
|
|
549
|
-
const
|
|
550
|
-
(
|
|
549
|
+
const g = F.map(
|
|
550
|
+
(i) => (i.options ?? []).map(
|
|
551
551
|
(n) => ({
|
|
552
|
-
combinationKey: [`${
|
|
552
|
+
combinationKey: [`${i._id}/${n._id}`],
|
|
553
553
|
selectionName: [n.name ?? ""]
|
|
554
554
|
})
|
|
555
555
|
)
|
|
556
556
|
);
|
|
557
|
-
return Me(
|
|
558
|
-
combinationKey: [...
|
|
559
|
-
selectionName: [...
|
|
560
|
-
})).map((
|
|
561
|
-
const n = [...
|
|
557
|
+
return Me(g, (i, n) => ({
|
|
558
|
+
combinationKey: [...i.combinationKey, ...n.combinationKey],
|
|
559
|
+
selectionName: [...i.selectionName, ...n.selectionName]
|
|
560
|
+
})).map((i) => {
|
|
561
|
+
const n = [...i.combinationKey];
|
|
562
562
|
return n.sort(), {
|
|
563
563
|
combinationKey: n.join("/"),
|
|
564
564
|
active: !0,
|
|
565
|
-
selectionName:
|
|
565
|
+
selectionName: i.selectionName
|
|
566
566
|
};
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
569
|
const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-100 px-5 py-5 gap-5 mb-3" }, Ct = { class: "flex items-center" }, Et = { class: "text-lg font-bold flex-grow" }, Ft = {
|
|
570
570
|
key: 0,
|
|
571
571
|
class: "table-auto w-full"
|
|
572
|
-
}, Lt = { class: "text-left" }, Vt = { class: "min-w-64" }, Nt = { class: "flex flex-col" },
|
|
572
|
+
}, Lt = { class: "text-left" }, Vt = { class: "min-w-64" }, Nt = { class: "flex flex-col" }, Dt = { class: "fm-typo-en-body-md-400" }, Rt = {
|
|
573
573
|
key: 0,
|
|
574
574
|
class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400"
|
|
575
|
-
}, Mt = { class: "w-1" },
|
|
575
|
+
}, Mt = { class: "w-1" }, me = /* @__PURE__ */ Y({
|
|
576
576
|
__name: "ApplyProduct",
|
|
577
577
|
props: {
|
|
578
578
|
isAddon: {
|
|
@@ -597,207 +597,207 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
597
597
|
}
|
|
598
598
|
},
|
|
599
599
|
emits: ["update:bindings"],
|
|
600
|
-
setup(F, { emit:
|
|
601
|
-
const s = F,
|
|
602
|
-
() => wt(
|
|
603
|
-
),
|
|
600
|
+
setup(F, { emit: g }) {
|
|
601
|
+
const s = F, i = g, n = ce(), t = z(() => s.isAddon ? "Addons" : "Products"), u = z(() => s.isAddon ? [] : s.categories), b = z(
|
|
602
|
+
() => wt(u.value, s.variants, s.menus)
|
|
603
|
+
), S = z(() => {
|
|
604
604
|
if (s.isAddon)
|
|
605
|
-
return s.bindings.map((
|
|
606
|
-
const
|
|
605
|
+
return s.bindings.map((d) => {
|
|
606
|
+
const c = s.menus.find((f) => f._id === d.productId), A = (c == null ? void 0 : c.name) ?? "-";
|
|
607
607
|
return {
|
|
608
|
-
...
|
|
609
|
-
name:
|
|
610
|
-
itemCode: (
|
|
608
|
+
...d,
|
|
609
|
+
name: A,
|
|
610
|
+
itemCode: (c == null ? void 0 : c.code) ?? "-"
|
|
611
611
|
};
|
|
612
612
|
});
|
|
613
|
-
const m =
|
|
614
|
-
return s.bindings.map((
|
|
613
|
+
const m = b.value.flatMap((d) => d.items);
|
|
614
|
+
return s.bindings.map((d) => {
|
|
615
615
|
var o;
|
|
616
|
-
const
|
|
617
|
-
let f = (
|
|
618
|
-
if (
|
|
619
|
-
const B = (((o =
|
|
620
|
-
(L) => L.combinationKey ===
|
|
616
|
+
const c = m.find((B) => B._id === d.productId), A = (c == null ? void 0 : c.name) ?? "-";
|
|
617
|
+
let f = (c == null ? void 0 : c.code) ?? "-", e;
|
|
618
|
+
if (d.combinationKey) {
|
|
619
|
+
const B = (((o = c == null ? void 0 : c.variant) == null ? void 0 : o.variantCombinations) || []).find(
|
|
620
|
+
(L) => L.combinationKey === d.combinationKey
|
|
621
621
|
);
|
|
622
622
|
e = (B == null ? void 0 : B.name) ?? (B == null ? void 0 : B.codeName) ?? "", f = (B == null ? void 0 : B.code) ?? f;
|
|
623
623
|
}
|
|
624
624
|
return {
|
|
625
|
-
...
|
|
626
|
-
name:
|
|
625
|
+
...d,
|
|
626
|
+
name: A,
|
|
627
627
|
itemCode: f,
|
|
628
628
|
variantName: e
|
|
629
629
|
};
|
|
630
630
|
});
|
|
631
631
|
});
|
|
632
|
-
function
|
|
633
|
-
|
|
632
|
+
function y(m) {
|
|
633
|
+
i(
|
|
634
634
|
"update:bindings",
|
|
635
635
|
s.bindings.filter(
|
|
636
|
-
(
|
|
636
|
+
(d) => d.productId !== m.productId || d.combinationKey !== m.combinationKey
|
|
637
637
|
)
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
const
|
|
642
|
-
(f) => f.productId === m && f.combinationKey ===
|
|
640
|
+
function v({ productId: m, combinationKey: d }, c) {
|
|
641
|
+
const A = s.bindings.find(
|
|
642
|
+
(f) => f.productId === m && f.combinationKey === d
|
|
643
643
|
);
|
|
644
|
-
|
|
644
|
+
A && (A.code = c);
|
|
645
645
|
}
|
|
646
646
|
function l() {
|
|
647
|
-
return
|
|
647
|
+
return b.value.map((m) => ({
|
|
648
648
|
label: m.name,
|
|
649
649
|
sublabel: "Category",
|
|
650
650
|
value: m.name,
|
|
651
651
|
disabled: !1,
|
|
652
|
-
children: m.items.map((
|
|
653
|
-
var
|
|
654
|
-
const
|
|
655
|
-
return
|
|
656
|
-
label:
|
|
657
|
-
value:
|
|
652
|
+
children: m.items.map((d) => {
|
|
653
|
+
var A;
|
|
654
|
+
const c = (A = d.variant) == null ? void 0 : A.variantCombinations;
|
|
655
|
+
return c != null && c.length ? {
|
|
656
|
+
label: d.name ?? "",
|
|
657
|
+
value: d._id,
|
|
658
658
|
sublabel: "Product",
|
|
659
659
|
children: [
|
|
660
660
|
{
|
|
661
|
-
label:
|
|
661
|
+
label: d.codeName ?? "",
|
|
662
662
|
value: {
|
|
663
|
-
productId:
|
|
663
|
+
productId: d._id
|
|
664
664
|
},
|
|
665
665
|
active: !!s.bindings.find(
|
|
666
|
-
({ productId: f, combinationKey: e }) =>
|
|
666
|
+
({ productId: f, combinationKey: e }) => d._id === f && !e
|
|
667
667
|
)
|
|
668
668
|
},
|
|
669
|
-
...
|
|
669
|
+
...c.map((f) => ({
|
|
670
670
|
label: f.codeName ?? "",
|
|
671
671
|
value: {
|
|
672
|
-
productId:
|
|
672
|
+
productId: d._id,
|
|
673
673
|
combinationKey: f.combinationKey
|
|
674
674
|
},
|
|
675
675
|
sublabel: "Variant",
|
|
676
676
|
active: !!s.bindings.find(
|
|
677
|
-
({ productId: e, combinationKey: o }) =>
|
|
677
|
+
({ productId: e, combinationKey: o }) => d._id === e && f.combinationKey === o
|
|
678
678
|
)
|
|
679
679
|
}))
|
|
680
680
|
]
|
|
681
681
|
} : {
|
|
682
|
-
label:
|
|
682
|
+
label: d.codeName ?? "",
|
|
683
683
|
value: {
|
|
684
|
-
productId:
|
|
684
|
+
productId: d._id
|
|
685
685
|
},
|
|
686
686
|
active: !!s.bindings.find(
|
|
687
|
-
({ productId: f, combinationKey: e }) =>
|
|
687
|
+
({ productId: f, combinationKey: e }) => d._id === f && !e
|
|
688
688
|
)
|
|
689
689
|
};
|
|
690
690
|
})
|
|
691
691
|
}));
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function r() {
|
|
694
694
|
return s.menus.map((m) => ({
|
|
695
695
|
label: m.name,
|
|
696
696
|
value: { productId: m._id },
|
|
697
697
|
active: !!s.bindings.find(
|
|
698
|
-
({ productId:
|
|
698
|
+
({ productId: d, combinationKey: c }) => m._id === d && !c
|
|
699
699
|
)
|
|
700
700
|
}));
|
|
701
701
|
}
|
|
702
|
-
function
|
|
703
|
-
const
|
|
704
|
-
return m.flatMap((
|
|
702
|
+
function h(m) {
|
|
703
|
+
const d = ee(s.bindings);
|
|
704
|
+
return m.flatMap((c) => c.children.flatMap((A) => {
|
|
705
705
|
var e;
|
|
706
|
-
if (K(
|
|
707
|
-
return
|
|
708
|
-
var
|
|
706
|
+
if (K(A))
|
|
707
|
+
return A.children.filter((o) => o.active).map((o) => {
|
|
708
|
+
var N, H;
|
|
709
709
|
const { productId: B, combinationKey: L } = o.value;
|
|
710
710
|
return L ? {
|
|
711
711
|
productId: B,
|
|
712
712
|
combinationKey: L,
|
|
713
|
-
code: ((
|
|
714
|
-
({ productId: U, combinationKey:
|
|
715
|
-
)) == null ? void 0 :
|
|
713
|
+
code: ((N = d.find(
|
|
714
|
+
({ productId: U, combinationKey: O }) => B === U && L === O
|
|
715
|
+
)) == null ? void 0 : N.code) ?? ""
|
|
716
716
|
} : {
|
|
717
717
|
productId: B,
|
|
718
|
-
code: ((H =
|
|
718
|
+
code: ((H = d.find(({ productId: U, combinationKey: O }) => B === U && !O)) == null ? void 0 : H.code) ?? ""
|
|
719
719
|
};
|
|
720
720
|
});
|
|
721
|
-
if (!
|
|
721
|
+
if (!A.active)
|
|
722
722
|
return [];
|
|
723
|
-
const { productId: f } =
|
|
723
|
+
const { productId: f } = A.value;
|
|
724
724
|
return [
|
|
725
725
|
{
|
|
726
726
|
productId: f,
|
|
727
|
-
code: ((e =
|
|
727
|
+
code: ((e = d.find(({ productId: o, combinationKey: B }) => f === o && !B)) == null ? void 0 : e.code) ?? ""
|
|
728
728
|
}
|
|
729
729
|
];
|
|
730
730
|
}));
|
|
731
731
|
}
|
|
732
732
|
function C(m) {
|
|
733
|
-
const
|
|
734
|
-
return m.filter((
|
|
735
|
-
(
|
|
736
|
-
var
|
|
733
|
+
const d = ee(s.bindings);
|
|
734
|
+
return m.filter((c) => c.active).map(
|
|
735
|
+
(c) => {
|
|
736
|
+
var A;
|
|
737
737
|
return {
|
|
738
|
-
productId:
|
|
739
|
-
code: ((
|
|
738
|
+
productId: c.value.productId,
|
|
739
|
+
code: ((A = d.find(({ productId: f }) => f === c.value.productId)) == null ? void 0 : A.code) ?? ""
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function k() {
|
|
745
745
|
let m;
|
|
746
|
-
s.isAddon ? m =
|
|
747
|
-
const
|
|
746
|
+
s.isAddon ? m = r() : m = l();
|
|
747
|
+
const d = {
|
|
748
748
|
modelValue: m
|
|
749
749
|
};
|
|
750
750
|
n.open({
|
|
751
751
|
title: `Select ${t.value}`,
|
|
752
|
-
contentComponent:
|
|
753
|
-
contentComponentProps:
|
|
752
|
+
contentComponent: Re,
|
|
753
|
+
contentComponentProps: d,
|
|
754
754
|
primaryActions: {
|
|
755
755
|
text: "Confirm",
|
|
756
756
|
close: !0
|
|
757
757
|
}
|
|
758
|
-
}).onPrimary((
|
|
759
|
-
let
|
|
760
|
-
s.isAddon ?
|
|
758
|
+
}).onPrimary((c) => {
|
|
759
|
+
let A;
|
|
760
|
+
s.isAddon ? A = C(c) : A = h(c), i("update:bindings", A);
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
const { t: p } = G();
|
|
764
|
-
return (m,
|
|
765
|
-
const
|
|
766
|
-
return w(),
|
|
764
|
+
return (m, d) => {
|
|
765
|
+
const c = E("FmButton"), A = E("FmTextField");
|
|
766
|
+
return w(), V("div", Bt, [
|
|
767
767
|
a("div", Ct, [
|
|
768
|
-
a("div", Et,
|
|
769
|
-
|
|
768
|
+
a("div", Et, j(F.isAddon ? I(p)("inventory.integration.apply.addons") : I(p)("inventory.integration.apply.products")), 1),
|
|
769
|
+
x(c, {
|
|
770
770
|
type: "button",
|
|
771
771
|
variant: "plain",
|
|
772
772
|
size: "md",
|
|
773
773
|
icon: "link",
|
|
774
|
-
label: F.isAddon ?
|
|
775
|
-
onClick:
|
|
774
|
+
label: F.isAddon ? I(p)("inventory.integration.apply.applyAddon") : I(p)("inventory.integration.apply.applyProduct"),
|
|
775
|
+
onClick: d[0] || (d[0] = (f) => k())
|
|
776
776
|
}, null, 8, ["label"])
|
|
777
777
|
]),
|
|
778
778
|
a("div", null, [
|
|
779
|
-
|
|
779
|
+
S.value.length > 0 ? (w(), V("table", Ft, [
|
|
780
780
|
a("thead", null, [
|
|
781
781
|
a("tr", Lt, [
|
|
782
|
-
a("th", Vt,
|
|
783
|
-
a("th", null,
|
|
784
|
-
|
|
782
|
+
a("th", Vt, j(I(p)("inventory.integration.apply.name")), 1),
|
|
783
|
+
a("th", null, j(I(p)("inventory.integration.apply.code")), 1),
|
|
784
|
+
d[1] || (d[1] = a("th", { class: "w-1" }, " ", -1))
|
|
785
785
|
])
|
|
786
786
|
]),
|
|
787
787
|
a("tbody", null, [
|
|
788
|
-
(w(!0),
|
|
789
|
-
|
|
788
|
+
(w(!0), V(J, null, $(S.value, (f, e) => (w(), V(J, { key: e }, [
|
|
789
|
+
d[2] || (d[2] = a("tr", { class: "block h-8" }, null, -1)),
|
|
790
790
|
a("tr", null, [
|
|
791
791
|
a("td", null, [
|
|
792
792
|
a("div", Nt, [
|
|
793
|
-
a("div",
|
|
794
|
-
f.variantName ? (w(),
|
|
793
|
+
a("div", Dt, j(f.itemCode) + " " + j(f.name), 1),
|
|
794
|
+
f.variantName ? (w(), V("div", Rt, j(f.variantName), 1)) : _("", !0)
|
|
795
795
|
])
|
|
796
796
|
]),
|
|
797
797
|
a("td", null, [
|
|
798
|
-
|
|
798
|
+
x(A, {
|
|
799
799
|
"model-value": f.code,
|
|
800
|
-
"onUpdate:modelValue": [(o) => f.code = o, (o) =>
|
|
800
|
+
"onUpdate:modelValue": [(o) => f.code = o, (o) => v(f, o)],
|
|
801
801
|
rules: [
|
|
802
802
|
function(B) {
|
|
803
803
|
return !!B || "Required";
|
|
@@ -806,13 +806,13 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
806
806
|
}, null, 8, ["model-value", "onUpdate:modelValue", "rules"])
|
|
807
807
|
]),
|
|
808
808
|
a("td", Mt, [
|
|
809
|
-
|
|
809
|
+
x(c, {
|
|
810
810
|
type: "button",
|
|
811
811
|
variant: "tertiary",
|
|
812
812
|
icon: "delete",
|
|
813
813
|
"icon-color": "#000000",
|
|
814
814
|
size: "md",
|
|
815
|
-
onClick: (o) =>
|
|
815
|
+
onClick: (o) => y(f)
|
|
816
816
|
}, null, 8, ["onClick"])
|
|
817
817
|
])
|
|
818
818
|
])
|
|
@@ -823,7 +823,7 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
823
823
|
]);
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
}),
|
|
826
|
+
}), Ot = { class: "flex flex-col gap-8 w-full" }, jt = /* @__PURE__ */ Y({
|
|
827
827
|
__name: "ApplyProductDialog",
|
|
828
828
|
props: {
|
|
829
829
|
categories: { default: () => [] },
|
|
@@ -835,55 +835,55 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
835
835
|
loading: { type: Boolean }
|
|
836
836
|
},
|
|
837
837
|
emits: ["update:setting", "update:show", "submit"],
|
|
838
|
-
setup(F, { emit:
|
|
839
|
-
const s = F,
|
|
840
|
-
|
|
841
|
-
if (
|
|
838
|
+
setup(F, { emit: g }) {
|
|
839
|
+
const s = F, i = g, n = pe(ee(s.setting));
|
|
840
|
+
ve([() => s.show], ([v]) => {
|
|
841
|
+
if (v)
|
|
842
842
|
for (const l of Object.keys(s.setting))
|
|
843
843
|
n[l] = s.setting[l];
|
|
844
844
|
});
|
|
845
|
-
const t =
|
|
846
|
-
function
|
|
847
|
-
var
|
|
848
|
-
(l = (
|
|
845
|
+
const t = M(), u = ae(s, "show");
|
|
846
|
+
function b() {
|
|
847
|
+
var v, l;
|
|
848
|
+
(l = (v = t.value) == null ? void 0 : v.validateInputs) == null || l.call(v);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
851
|
-
|
|
850
|
+
function S() {
|
|
851
|
+
i("update:setting", ee(n)), i("submit");
|
|
852
852
|
}
|
|
853
|
-
const { t:
|
|
854
|
-
return (
|
|
855
|
-
const
|
|
856
|
-
return w(), X(
|
|
857
|
-
modelValue:
|
|
858
|
-
"onUpdate:modelValue": l[4] || (l[4] = (p) => se(
|
|
859
|
-
header:
|
|
853
|
+
const { t: y } = G();
|
|
854
|
+
return (v, l) => {
|
|
855
|
+
const r = E("FmChip"), h = E("FmForm"), C = E("FmButton"), k = E("FmSideSheet");
|
|
856
|
+
return w(), X(k, {
|
|
857
|
+
modelValue: I(u),
|
|
858
|
+
"onUpdate:modelValue": l[4] || (l[4] = (p) => se(u) ? u.value = p : null),
|
|
859
|
+
header: I(y)("inventory.integration.apply.title"),
|
|
860
860
|
"dismiss-away": "",
|
|
861
861
|
"close-button": "",
|
|
862
862
|
"max-width": 500
|
|
863
863
|
}, {
|
|
864
|
-
default:
|
|
865
|
-
a("div",
|
|
864
|
+
default: R(() => [
|
|
865
|
+
a("div", Ot, [
|
|
866
866
|
a("div", null, [
|
|
867
|
-
|
|
867
|
+
x(r, { label: "Menu v3" })
|
|
868
868
|
]),
|
|
869
|
-
|
|
869
|
+
x(h, {
|
|
870
870
|
ref_key: "formRef",
|
|
871
871
|
ref: t,
|
|
872
|
-
onValidationSuccess: l[2] || (l[2] = (p) =>
|
|
872
|
+
onValidationSuccess: l[2] || (l[2] = (p) => S())
|
|
873
873
|
}, {
|
|
874
|
-
default:
|
|
875
|
-
|
|
874
|
+
default: R(() => [
|
|
875
|
+
x(me, {
|
|
876
876
|
bindings: n.bindings,
|
|
877
|
-
categories:
|
|
878
|
-
variants:
|
|
879
|
-
menus:
|
|
877
|
+
categories: v.categories,
|
|
878
|
+
variants: v.variants,
|
|
879
|
+
menus: v.menus,
|
|
880
880
|
"onUpdate:bindings": l[0] || (l[0] = (p) => n.bindings = p)
|
|
881
881
|
}, null, 8, ["bindings", "categories", "variants", "menus"]),
|
|
882
|
-
|
|
882
|
+
x(It, {
|
|
883
883
|
form: t.value,
|
|
884
884
|
modifiers: n.modifiers ?? [],
|
|
885
|
-
groups:
|
|
886
|
-
items:
|
|
885
|
+
groups: v.groups ?? [],
|
|
886
|
+
items: v.menus ?? [],
|
|
887
887
|
"onUpdate:modifiers": l[1] || (l[1] = (p) => n.modifiers = p)
|
|
888
888
|
}, null, 8, ["form", "modifiers", "groups", "items"])
|
|
889
889
|
]),
|
|
@@ -891,12 +891,12 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
891
891
|
}, 512)
|
|
892
892
|
])
|
|
893
893
|
]),
|
|
894
|
-
"side-sheet-footer":
|
|
895
|
-
|
|
896
|
-
loading:
|
|
894
|
+
"side-sheet-footer": R(() => [
|
|
895
|
+
x(C, {
|
|
896
|
+
loading: v.loading,
|
|
897
897
|
type: "submit",
|
|
898
|
-
label:
|
|
899
|
-
onClick: l[3] || (l[3] = (p) =>
|
|
898
|
+
label: I(y)("common.confirm"),
|
|
899
|
+
onClick: l[3] || (l[3] = (p) => b())
|
|
900
900
|
}, null, 8, ["loading", "label"])
|
|
901
901
|
]),
|
|
902
902
|
_: 1
|
|
@@ -915,82 +915,82 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
915
915
|
loading: { type: Boolean }
|
|
916
916
|
},
|
|
917
917
|
emits: ["update:setting", "update:show", "submit"],
|
|
918
|
-
setup(F, { emit:
|
|
919
|
-
const s = F,
|
|
920
|
-
|
|
918
|
+
setup(F, { emit: g }) {
|
|
919
|
+
const s = F, i = g, n = pe(ee(s.setting));
|
|
920
|
+
ve([() => s.show], ([p]) => {
|
|
921
921
|
if (p)
|
|
922
922
|
for (const m of Object.keys(s.setting))
|
|
923
923
|
n[m] = s.setting[m];
|
|
924
924
|
});
|
|
925
|
-
const t = z(() => s.menus.filter((p) => (p == null ? void 0 : p.category) === null)),
|
|
926
|
-
const m = s.menus.find((
|
|
925
|
+
const t = z(() => s.menus.filter((p) => (p == null ? void 0 : p.category) === null)), u = z(() => n.bindings.filter((p) => {
|
|
926
|
+
const m = s.menus.find((d) => d._id === p.productId);
|
|
927
927
|
return m ? (m == null ? void 0 : m.category) === null : !1;
|
|
928
|
-
})),
|
|
929
|
-
const m = s.menus.find((
|
|
928
|
+
})), b = z(() => s.menus.filter((p) => (p == null ? void 0 : p.category) !== null)), S = z(() => n.bindings.filter((p) => {
|
|
929
|
+
const m = s.menus.find((d) => d._id === p.productId);
|
|
930
930
|
return m ? (m == null ? void 0 : m.category) !== null : !1;
|
|
931
931
|
}));
|
|
932
|
-
function
|
|
933
|
-
n.bindings = [...
|
|
932
|
+
function y(p) {
|
|
933
|
+
n.bindings = [...u.value, ...p];
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
n.bindings = [...
|
|
935
|
+
function v(p) {
|
|
936
|
+
n.bindings = [...S.value, ...p];
|
|
937
937
|
}
|
|
938
|
-
const l =
|
|
939
|
-
function
|
|
938
|
+
const l = M(), r = ae(s, "show");
|
|
939
|
+
function h() {
|
|
940
940
|
var p, m;
|
|
941
941
|
(m = (p = l.value) == null ? void 0 : p.validateInputs) == null || m.call(p);
|
|
942
942
|
}
|
|
943
943
|
function C() {
|
|
944
|
-
|
|
944
|
+
i("update:setting", ee(n)), i("submit");
|
|
945
945
|
}
|
|
946
|
-
const { t:
|
|
946
|
+
const { t: k } = G();
|
|
947
947
|
return (p, m) => {
|
|
948
|
-
const
|
|
948
|
+
const d = E("FmChip"), c = E("FmForm"), A = E("FmButton"), f = E("FmSideSheet");
|
|
949
949
|
return w(), X(f, {
|
|
950
|
-
modelValue:
|
|
951
|
-
"onUpdate:modelValue": m[4] || (m[4] = (e) => se(
|
|
952
|
-
header:
|
|
950
|
+
modelValue: I(r),
|
|
951
|
+
"onUpdate:modelValue": m[4] || (m[4] = (e) => se(r) ? r.value = e : null),
|
|
952
|
+
header: I(k)("inventory.integration.apply.title"),
|
|
953
953
|
"dismiss-away": "",
|
|
954
954
|
"close-button": "",
|
|
955
955
|
"max-width": 500
|
|
956
956
|
}, {
|
|
957
|
-
default:
|
|
957
|
+
default: R(() => [
|
|
958
958
|
a("div", Tt, [
|
|
959
959
|
a("div", null, [
|
|
960
|
-
|
|
960
|
+
x(d, { label: "Menu v4" })
|
|
961
961
|
]),
|
|
962
|
-
|
|
962
|
+
x(c, {
|
|
963
963
|
ref_key: "formRef",
|
|
964
964
|
ref: l,
|
|
965
965
|
onValidationSuccess: m[2] || (m[2] = (e) => C())
|
|
966
966
|
}, {
|
|
967
|
-
default:
|
|
968
|
-
|
|
967
|
+
default: R(() => [
|
|
968
|
+
x(me, {
|
|
969
969
|
categories: p.categories,
|
|
970
970
|
variants: p.variants,
|
|
971
|
-
bindings:
|
|
972
|
-
menus:
|
|
973
|
-
"onUpdate:bindings": m[0] || (m[0] = (e) =>
|
|
971
|
+
bindings: S.value,
|
|
972
|
+
menus: b.value,
|
|
973
|
+
"onUpdate:bindings": m[0] || (m[0] = (e) => y(e))
|
|
974
974
|
}, null, 8, ["categories", "variants", "bindings", "menus"]),
|
|
975
|
-
|
|
975
|
+
x(me, {
|
|
976
976
|
"is-addon": !0,
|
|
977
977
|
categories: [],
|
|
978
978
|
variants: p.variants,
|
|
979
|
-
bindings:
|
|
979
|
+
bindings: u.value,
|
|
980
980
|
menus: t.value,
|
|
981
|
-
"onUpdate:bindings": m[1] || (m[1] = (e) =>
|
|
981
|
+
"onUpdate:bindings": m[1] || (m[1] = (e) => v(e))
|
|
982
982
|
}, null, 8, ["variants", "bindings", "menus"])
|
|
983
983
|
]),
|
|
984
984
|
_: 1
|
|
985
985
|
}, 512)
|
|
986
986
|
])
|
|
987
987
|
]),
|
|
988
|
-
"side-sheet-footer":
|
|
989
|
-
|
|
988
|
+
"side-sheet-footer": R(() => [
|
|
989
|
+
x(A, {
|
|
990
990
|
loading: p.loading,
|
|
991
991
|
type: "submit",
|
|
992
|
-
label:
|
|
993
|
-
onClick: m[3] || (m[3] = (e) =>
|
|
992
|
+
label: I(k)("common.confirm"),
|
|
993
|
+
onClick: m[3] || (m[3] = (e) => h())
|
|
994
994
|
}, null, 8, ["loading", "label"])
|
|
995
995
|
]),
|
|
996
996
|
_: 1
|
|
@@ -1000,43 +1000,43 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1000
1000
|
}), Ht = { key: 0 }, _t = { class: "flex justify-center" }, Xt = ["src"], Ut = { class: "flex flex-col items-center gap-2" }, Qt = { class: "text-lg font-bold" }, Yt = { class: "text-fm-color-neutral-gray-300" }, Jt = { key: 0 }, Kt = /* @__PURE__ */ Y({
|
|
1001
1001
|
__name: "FoodMarketHub",
|
|
1002
1002
|
setup(F) {
|
|
1003
|
-
const
|
|
1004
|
-
var
|
|
1005
|
-
return (
|
|
1003
|
+
const g = ie(), s = te(), i = W(), n = M(!1), t = qe(), u = z(() => t.state.menu ?? []), b = z(() => t.state.group ?? []), S = z(() => t.state.variants ?? []), y = z(() => t.state.categories ?? []), v = Ue(), l = z(() => {
|
|
1004
|
+
var c;
|
|
1005
|
+
return (c = g.currentBusiness.value) == null ? void 0 : c.menuVersion;
|
|
1006
1006
|
});
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
async function
|
|
1010
|
-
|
|
1007
|
+
i.watchLocation(t.init);
|
|
1008
|
+
const r = M(!1);
|
|
1009
|
+
async function h() {
|
|
1010
|
+
r.value = !0;
|
|
1011
1011
|
}
|
|
1012
|
-
const { breakpoints: C } = Ve(),
|
|
1012
|
+
const { breakpoints: C } = Ve(), k = z(() => C.value.xs || C.value.sm), p = z(() => k.value);
|
|
1013
1013
|
async function m() {
|
|
1014
|
-
const
|
|
1015
|
-
if (
|
|
1014
|
+
const c = t.state.setting;
|
|
1015
|
+
if (c) {
|
|
1016
1016
|
n.value = !0;
|
|
1017
1017
|
try {
|
|
1018
|
-
await
|
|
1018
|
+
await v.updateSetting(c), s.open({
|
|
1019
1019
|
title: "Success",
|
|
1020
1020
|
message: "Your changes has been saved",
|
|
1021
1021
|
type: "success"
|
|
1022
|
-
}),
|
|
1022
|
+
}), r.value = !1, await t.init();
|
|
1023
1023
|
return;
|
|
1024
|
-
} catch (
|
|
1024
|
+
} catch (A) {
|
|
1025
1025
|
s.open({
|
|
1026
1026
|
title: "Something went wrong",
|
|
1027
1027
|
message: "Cannot update integration info. Please try again.",
|
|
1028
1028
|
type: "error"
|
|
1029
|
-
}), console.error("Error at updating integration info",
|
|
1029
|
+
}), console.error("Error at updating integration info", A);
|
|
1030
1030
|
} finally {
|
|
1031
1031
|
n.value = !1;
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
const { t:
|
|
1036
|
-
return (
|
|
1035
|
+
const { t: d } = G();
|
|
1036
|
+
return (c, A) => {
|
|
1037
1037
|
const f = E("FmCardSection"), e = E("FmCard");
|
|
1038
|
-
return
|
|
1039
|
-
|
|
1038
|
+
return I(t).isEnabled && !I(t).isBusinessLocation ? (w(), V("div", Ht, [
|
|
1039
|
+
x(e, {
|
|
1040
1040
|
class: q({
|
|
1041
1041
|
"w-full": p.value,
|
|
1042
1042
|
"w-1/2": !p.value,
|
|
@@ -1045,20 +1045,20 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1045
1045
|
"cursor-pointer": !0,
|
|
1046
1046
|
"hover:border-fm-color-primary": !0
|
|
1047
1047
|
}),
|
|
1048
|
-
onClick:
|
|
1048
|
+
onClick: A[0] || (A[0] = (o) => h())
|
|
1049
1049
|
}, {
|
|
1050
|
-
default:
|
|
1051
|
-
|
|
1052
|
-
default:
|
|
1050
|
+
default: R(() => [
|
|
1051
|
+
x(f, null, {
|
|
1052
|
+
default: R(() => [
|
|
1053
1053
|
a("div", _t, [
|
|
1054
1054
|
a("img", {
|
|
1055
|
-
src:
|
|
1055
|
+
src: I(tt),
|
|
1056
1056
|
alt: "Food Market Hub"
|
|
1057
1057
|
}, null, 8, Xt)
|
|
1058
1058
|
]),
|
|
1059
1059
|
a("div", Ut, [
|
|
1060
|
-
a("div", Qt,
|
|
1061
|
-
a("div", Yt,
|
|
1060
|
+
a("div", Qt, j(I(d)("inventory.integration.fmh.title")), 1),
|
|
1061
|
+
a("div", Yt, j(I(d)("inventory.integration.fmh.description")), 1)
|
|
1062
1062
|
])
|
|
1063
1063
|
]),
|
|
1064
1064
|
_: 1
|
|
@@ -1066,32 +1066,32 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1066
1066
|
]),
|
|
1067
1067
|
_: 1
|
|
1068
1068
|
}, 8, ["class"]),
|
|
1069
|
-
|
|
1069
|
+
I(t).state.setting ? (w(), V("div", Jt, [
|
|
1070
1070
|
(w(), X(ue, { to: "body" }, [
|
|
1071
|
-
l.value === "v3" ? (w(), X(
|
|
1071
|
+
l.value === "v3" ? (w(), X(jt, {
|
|
1072
1072
|
key: 0,
|
|
1073
|
-
menus:
|
|
1074
|
-
variants:
|
|
1075
|
-
categories:
|
|
1076
|
-
setting:
|
|
1077
|
-
"onUpdate:setting":
|
|
1078
|
-
show:
|
|
1079
|
-
"onUpdate:show":
|
|
1080
|
-
groups:
|
|
1073
|
+
menus: u.value,
|
|
1074
|
+
variants: S.value,
|
|
1075
|
+
categories: y.value,
|
|
1076
|
+
setting: I(t).state.setting,
|
|
1077
|
+
"onUpdate:setting": A[1] || (A[1] = (o) => I(t).state.setting = o),
|
|
1078
|
+
show: r.value,
|
|
1079
|
+
"onUpdate:show": A[2] || (A[2] = (o) => r.value = o),
|
|
1080
|
+
groups: b.value,
|
|
1081
1081
|
loading: n.value,
|
|
1082
|
-
onSubmit:
|
|
1082
|
+
onSubmit: A[3] || (A[3] = (o) => m())
|
|
1083
1083
|
}, null, 8, ["menus", "variants", "categories", "setting", "show", "groups", "loading"])) : (w(), X(zt, {
|
|
1084
1084
|
key: 1,
|
|
1085
|
-
menus:
|
|
1086
|
-
variants:
|
|
1087
|
-
categories:
|
|
1088
|
-
setting:
|
|
1089
|
-
"onUpdate:setting":
|
|
1090
|
-
show:
|
|
1091
|
-
"onUpdate:show":
|
|
1092
|
-
groups:
|
|
1085
|
+
menus: u.value,
|
|
1086
|
+
variants: S.value,
|
|
1087
|
+
categories: y.value,
|
|
1088
|
+
setting: I(t).state.setting,
|
|
1089
|
+
"onUpdate:setting": A[4] || (A[4] = (o) => I(t).state.setting = o),
|
|
1090
|
+
show: r.value,
|
|
1091
|
+
"onUpdate:show": A[5] || (A[5] = (o) => r.value = o),
|
|
1092
|
+
groups: b.value,
|
|
1093
1093
|
loading: n.value,
|
|
1094
|
-
onSubmit:
|
|
1094
|
+
onSubmit: A[6] || (A[6] = (o) => m())
|
|
1095
1095
|
}, null, 8, ["menus", "variants", "categories", "setting", "show", "groups", "loading"]))
|
|
1096
1096
|
]))
|
|
1097
1097
|
])) : _("", !0)
|
|
@@ -1118,25 +1118,25 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1118
1118
|
}) }
|
|
1119
1119
|
},
|
|
1120
1120
|
emits: ["update:modelValue"],
|
|
1121
|
-
setup(F, { emit:
|
|
1122
|
-
const s = F,
|
|
1123
|
-
return (t,
|
|
1124
|
-
const
|
|
1125
|
-
return w(),
|
|
1121
|
+
setup(F, { emit: g }) {
|
|
1122
|
+
const s = F, i = z(() => s.modelValue), n = g;
|
|
1123
|
+
return (t, u) => {
|
|
1124
|
+
const b = E("FmSelect"), S = E("FmButton"), y = E("FmIcon");
|
|
1125
|
+
return w(), V("div", qt, [
|
|
1126
1126
|
a("div", Gt, [
|
|
1127
|
-
|
|
1127
|
+
x(b, {
|
|
1128
1128
|
placeholder: "Select NetSuite Location",
|
|
1129
1129
|
items: t.nsLocationOptions,
|
|
1130
1130
|
searchable: "",
|
|
1131
1131
|
searchTarget: "label",
|
|
1132
|
-
"model-value":
|
|
1133
|
-
"onUpdate:modelValue":
|
|
1132
|
+
"model-value": i.value,
|
|
1133
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => n("update:modelValue", v))
|
|
1134
1134
|
}, null, 8, ["items", "model-value"]),
|
|
1135
|
-
|
|
1135
|
+
i.value.netsuiteId ? (w(), X(S, {
|
|
1136
1136
|
key: 0,
|
|
1137
1137
|
variant: "secondary",
|
|
1138
1138
|
label: "Clear",
|
|
1139
|
-
onClick:
|
|
1139
|
+
onClick: u[1] || (u[1] = (v) => n("update:modelValue", {
|
|
1140
1140
|
netsuiteId: "",
|
|
1141
1141
|
name: "",
|
|
1142
1142
|
subsidiaryName: "",
|
|
@@ -1144,9 +1144,9 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1144
1144
|
}))
|
|
1145
1145
|
})) : _("", !0)
|
|
1146
1146
|
]),
|
|
1147
|
-
t.isDuplicate ? (w(),
|
|
1148
|
-
|
|
1149
|
-
|
|
1147
|
+
t.isDuplicate ? (w(), V("div", Pt, " NetSuite location being used by another FeedMe location. ")) : _("", !0),
|
|
1148
|
+
i.value.netsuiteId ? (w(), V("div", Wt, [
|
|
1149
|
+
x(y, {
|
|
1150
1150
|
name: "cloud",
|
|
1151
1151
|
color: "neutral-gray-400",
|
|
1152
1152
|
size: "md",
|
|
@@ -1154,9 +1154,9 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1154
1154
|
outline: ""
|
|
1155
1155
|
}),
|
|
1156
1156
|
a("div", $t, [
|
|
1157
|
-
a("span", en,
|
|
1158
|
-
a("span", tn, "ID: " +
|
|
1159
|
-
a("span", nn, "Subsidiary: " +
|
|
1157
|
+
a("span", en, j(i.value.name), 1),
|
|
1158
|
+
a("span", tn, "ID: " + j(i.value.netsuiteId), 1),
|
|
1159
|
+
a("span", nn, "Subsidiary: " + j(i.value.subsidiaryName), 1)
|
|
1160
1160
|
])
|
|
1161
1161
|
])) : _("", !0)
|
|
1162
1162
|
]);
|
|
@@ -1183,24 +1183,24 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1183
1183
|
}
|
|
1184
1184
|
},
|
|
1185
1185
|
emits: ["update:loading", "update:showDialog"],
|
|
1186
|
-
setup(F, { emit:
|
|
1187
|
-
const s = le(),
|
|
1186
|
+
setup(F, { emit: g }) {
|
|
1187
|
+
const s = le(), i = te(), n = [
|
|
1188
1188
|
{
|
|
1189
1189
|
id: "fmLocation",
|
|
1190
1190
|
header: "FeedMe Location",
|
|
1191
|
-
cell(
|
|
1192
|
-
const C =
|
|
1191
|
+
cell(h) {
|
|
1192
|
+
const C = h.row.original, k = D(ne.FmIcon, {
|
|
1193
1193
|
name: C.type,
|
|
1194
1194
|
color: "neutral-gray-400",
|
|
1195
1195
|
size: "md",
|
|
1196
1196
|
class: "mr-2",
|
|
1197
1197
|
outline: !0
|
|
1198
1198
|
});
|
|
1199
|
-
return
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1199
|
+
return D("div", { class: "flex items-center" }, [
|
|
1200
|
+
k,
|
|
1201
|
+
D("div", { class: "flex flex-col" }, [
|
|
1202
|
+
D("span", { class: "font-medium" }, C.name),
|
|
1203
|
+
D("span", { class: "text-xs text-gray-400" }, C.doc._id)
|
|
1204
1204
|
])
|
|
1205
1205
|
]);
|
|
1206
1206
|
}
|
|
@@ -1208,85 +1208,85 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1208
1208
|
{
|
|
1209
1209
|
id: "nsLocation",
|
|
1210
1210
|
header: "NetSuite Location",
|
|
1211
|
-
cell(
|
|
1212
|
-
const C =
|
|
1213
|
-
([m,
|
|
1211
|
+
cell(h) {
|
|
1212
|
+
const C = h.row.original, k = b.value[C.dbName], p = Object.entries(b.value).some(
|
|
1213
|
+
([m, d]) => m !== C.dbName && d.netsuiteId === (k == null ? void 0 : k.netsuiteId)
|
|
1214
1214
|
);
|
|
1215
|
-
return
|
|
1215
|
+
return D(on, {
|
|
1216
1216
|
isDuplicate: p,
|
|
1217
|
-
nsLocationOptions:
|
|
1218
|
-
modelValue:
|
|
1217
|
+
nsLocationOptions: v.value,
|
|
1218
|
+
modelValue: k,
|
|
1219
1219
|
fmLocation: C,
|
|
1220
1220
|
"onUpdate:modelValue": (m) => {
|
|
1221
|
-
m.netsuiteId ?
|
|
1222
|
-
...
|
|
1221
|
+
m.netsuiteId ? b.value = {
|
|
1222
|
+
...b.value,
|
|
1223
1223
|
[C.dbName]: {
|
|
1224
1224
|
netsuiteId: m.netsuiteId,
|
|
1225
1225
|
name: m.name,
|
|
1226
1226
|
subsidiaryName: m.subsidiaryName,
|
|
1227
1227
|
subsidiaryId: m.subsidiaryId
|
|
1228
1228
|
}
|
|
1229
|
-
} : delete
|
|
1229
|
+
} : delete b.value[C.dbName];
|
|
1230
1230
|
}
|
|
1231
1231
|
});
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
], t = F,
|
|
1235
|
-
label:
|
|
1236
|
-
value:
|
|
1237
|
-
}))), l = z(() => Object.values(
|
|
1238
|
-
(
|
|
1234
|
+
], t = F, u = g, b = M({}), S = M(), y = M(""), v = z(() => t.nsLocationsNotBeingUsed.map((h) => ({
|
|
1235
|
+
label: h.name,
|
|
1236
|
+
value: h
|
|
1237
|
+
}))), l = z(() => Object.values(b.value).length === 0 || Object.values(b.value).some(
|
|
1238
|
+
(h) => Object.values(b.value).filter((C) => C.netsuiteId === h.netsuiteId).length > 1
|
|
1239
1239
|
));
|
|
1240
|
-
async function
|
|
1240
|
+
async function r() {
|
|
1241
1241
|
try {
|
|
1242
|
-
|
|
1242
|
+
u("update:loading", !0), await s.updateLocationConfigs(b.value), i.open({
|
|
1243
1243
|
message: "Locations updated successfully",
|
|
1244
1244
|
type: "success"
|
|
1245
|
-
}),
|
|
1245
|
+
}), u("update:showDialog", !1);
|
|
1246
1246
|
} catch {
|
|
1247
|
-
|
|
1247
|
+
i.open({
|
|
1248
1248
|
message: "Failed to update locations. Please try again.",
|
|
1249
1249
|
type: "error"
|
|
1250
1250
|
});
|
|
1251
1251
|
} finally {
|
|
1252
|
-
|
|
1252
|
+
u("update:loading", !1);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
return (
|
|
1256
|
-
const
|
|
1257
|
-
return w(), X(
|
|
1255
|
+
return (h, C) => {
|
|
1256
|
+
const k = E("FmTable"), p = E("FmForm"), m = E("FmSpacer"), d = E("FmButton"), c = E("FmDialog");
|
|
1257
|
+
return w(), X(c, {
|
|
1258
1258
|
modelValue: F.showDialog,
|
|
1259
|
-
"onUpdate:modelValue": C[2] || (C[2] = (
|
|
1259
|
+
"onUpdate:modelValue": C[2] || (C[2] = (A) => h.$emit("update:showDialog", A)),
|
|
1260
1260
|
overlay: !0,
|
|
1261
1261
|
"max-width": "900px"
|
|
1262
1262
|
}, {
|
|
1263
|
-
"dialog-header":
|
|
1263
|
+
"dialog-header": R(() => C[3] || (C[3] = [
|
|
1264
1264
|
a("div", null, "Add locations", -1)
|
|
1265
1265
|
])),
|
|
1266
|
-
"dialog-footer":
|
|
1267
|
-
|
|
1268
|
-
|
|
1266
|
+
"dialog-footer": R(() => [
|
|
1267
|
+
x(m, { class: "sm:hidden xs:hidden" }),
|
|
1268
|
+
x(d, {
|
|
1269
1269
|
class: "sm:w-full xs:w-full",
|
|
1270
1270
|
label: "Submit",
|
|
1271
1271
|
size: "md",
|
|
1272
1272
|
disabled: l.value,
|
|
1273
|
-
onClick:
|
|
1273
|
+
onClick: r
|
|
1274
1274
|
}, null, 8, ["disabled"])
|
|
1275
1275
|
]),
|
|
1276
|
-
default:
|
|
1277
|
-
|
|
1276
|
+
default: R(() => [
|
|
1277
|
+
x(p, {
|
|
1278
1278
|
ref: "formRef",
|
|
1279
1279
|
class: "mb-4",
|
|
1280
|
-
"model-value":
|
|
1281
|
-
"onUpdate:modelValue": C[1] || (C[1] = (
|
|
1280
|
+
"model-value": S.value,
|
|
1281
|
+
"onUpdate:modelValue": C[1] || (C[1] = (A) => S.value = A)
|
|
1282
1282
|
}, {
|
|
1283
|
-
default:
|
|
1284
|
-
|
|
1285
|
-
modelValue:
|
|
1286
|
-
"onUpdate:modelValue": C[0] || (C[0] = (
|
|
1283
|
+
default: R(() => [
|
|
1284
|
+
x(k, {
|
|
1285
|
+
modelValue: S.value,
|
|
1286
|
+
"onUpdate:modelValue": C[0] || (C[0] = (A) => S.value = A),
|
|
1287
1287
|
"row-data": t.fmLocationNotYetConfigured,
|
|
1288
1288
|
"column-defs": n,
|
|
1289
|
-
"search-value":
|
|
1289
|
+
"search-value": y.value,
|
|
1290
1290
|
"shrink-at": !1
|
|
1291
1291
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
1292
1292
|
]),
|
|
@@ -1300,7 +1300,7 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1300
1300
|
}), an = { key: 0 }, ln = {
|
|
1301
1301
|
key: 1,
|
|
1302
1302
|
class: "flex flex-col gap-8 w-full"
|
|
1303
|
-
}, rn = { class: "flex gap-2 flex-wrap" }, un = { class: "p-8" },
|
|
1303
|
+
}, rn = { class: "flex gap-2 flex-wrap" }, un = { class: "p-8" }, cn = { class: "flex gap-8 items-center justify-start" }, dn = /* @__PURE__ */ Y({
|
|
1304
1304
|
__name: "BusinessNetSuiteSideSheet",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
setting: {},
|
|
@@ -1309,37 +1309,37 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1309
1309
|
loading: { type: Boolean }
|
|
1310
1310
|
},
|
|
1311
1311
|
emits: ["update:setting", "update:show", "update:loading", "submit"],
|
|
1312
|
-
setup(F, { emit:
|
|
1313
|
-
const s = ie(),
|
|
1314
|
-
|
|
1315
|
-
if (
|
|
1316
|
-
for (const
|
|
1317
|
-
|
|
1312
|
+
setup(F, { emit: g }) {
|
|
1313
|
+
const s = ie(), i = W(), n = M(!1), t = F, u = g, b = pe(ee(t.setting));
|
|
1314
|
+
ve([() => t.show], ([d]) => {
|
|
1315
|
+
if (d)
|
|
1316
|
+
for (const c of Object.keys(t.setting))
|
|
1317
|
+
b[c] = t.setting[c];
|
|
1318
1318
|
});
|
|
1319
|
-
const
|
|
1320
|
-
(
|
|
1321
|
-
)),
|
|
1319
|
+
const S = M(), y = ae(t, "show"), v = M(), l = M(""), r = z(() => t.setting.locations.filter(
|
|
1320
|
+
(d) => d.name.toLowerCase().includes(l.value.toLowerCase()) || d.netSuiteId.toLowerCase().includes(l.value.toLowerCase())
|
|
1321
|
+
)), h = [
|
|
1322
1322
|
{
|
|
1323
1323
|
id: "location",
|
|
1324
1324
|
header: () => "FeedMe Location",
|
|
1325
|
-
cell(
|
|
1326
|
-
const
|
|
1327
|
-
(e) => e.type ===
|
|
1325
|
+
cell(d) {
|
|
1326
|
+
const c = d.row.original, A = i.locations.find(
|
|
1327
|
+
(e) => e.type === c.type && e.doc._id === c.id
|
|
1328
1328
|
);
|
|
1329
|
-
if (!
|
|
1330
|
-
return
|
|
1331
|
-
const f =
|
|
1332
|
-
name:
|
|
1329
|
+
if (!A)
|
|
1330
|
+
return D("div", "Unknown Location");
|
|
1331
|
+
const f = D(ne.FmIcon, {
|
|
1332
|
+
name: A.type,
|
|
1333
1333
|
color: "neutral-gray-400",
|
|
1334
1334
|
size: "md",
|
|
1335
1335
|
class: "mr-2",
|
|
1336
1336
|
outline: !0
|
|
1337
1337
|
});
|
|
1338
|
-
return
|
|
1338
|
+
return D("div", { class: "flex items-center" }, [
|
|
1339
1339
|
f,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1340
|
+
D("div", { class: "flex flex-col" }, [
|
|
1341
|
+
D("span", { class: "font-medium" }, A.name),
|
|
1342
|
+
D("span", { class: "text-xs text-gray-400" }, A.doc._id)
|
|
1343
1343
|
])
|
|
1344
1344
|
]);
|
|
1345
1345
|
}
|
|
@@ -1347,28 +1347,28 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1347
1347
|
{
|
|
1348
1348
|
id: "netsuite",
|
|
1349
1349
|
header: () => "NetSuite Location",
|
|
1350
|
-
cell(
|
|
1350
|
+
cell(d) {
|
|
1351
1351
|
var e;
|
|
1352
|
-
const
|
|
1353
|
-
(o) => o.netsuiteId ===
|
|
1354
|
-
)) == null ? void 0 : e.subsidiaryName, f =
|
|
1352
|
+
const c = d.row.original, A = (e = t.nsLocations.find(
|
|
1353
|
+
(o) => o.netsuiteId === c.netSuiteId
|
|
1354
|
+
)) == null ? void 0 : e.subsidiaryName, f = D(ne.FmIcon, {
|
|
1355
1355
|
name: "cloud",
|
|
1356
1356
|
color: "neutral-gray-400",
|
|
1357
1357
|
size: "md",
|
|
1358
1358
|
class: "mr-2",
|
|
1359
1359
|
outline: !0
|
|
1360
1360
|
});
|
|
1361
|
-
return
|
|
1361
|
+
return D("div", { class: "flex items-center" }, [
|
|
1362
1362
|
f,
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1363
|
+
D("div", { class: "flex flex-col" }, [
|
|
1364
|
+
D("span", { class: "font-medium" }, c.name),
|
|
1365
|
+
D("span", { class: "text-xs text-gray-400" }, `ID: ${c.netSuiteId}`),
|
|
1366
|
+
D("span", { class: "text-xs text-gray-400" }, `Subsidiary: ${A}`)
|
|
1367
1367
|
])
|
|
1368
1368
|
]);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
-
], { t: C } = G(),
|
|
1371
|
+
], { t: C } = G(), k = [
|
|
1372
1372
|
"Unit Type",
|
|
1373
1373
|
"Inventory Item",
|
|
1374
1374
|
"Location",
|
|
@@ -1377,78 +1377,78 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1377
1377
|
"Purchase Order",
|
|
1378
1378
|
"Transfer Order",
|
|
1379
1379
|
"Inventory Transfer"
|
|
1380
|
-
], p = z(() =>
|
|
1381
|
-
(
|
|
1382
|
-
(
|
|
1380
|
+
], p = z(() => i.locations.filter(
|
|
1381
|
+
(d) => !t.setting.locations.some(
|
|
1382
|
+
(c) => c.id === d.doc._id && c.type === d.type
|
|
1383
1383
|
)
|
|
1384
1384
|
)), m = z(() => t.nsLocations.filter(
|
|
1385
|
-
(
|
|
1385
|
+
(d) => !t.setting.locations.some((c) => c.netSuiteId === d.netsuiteId)
|
|
1386
1386
|
));
|
|
1387
|
-
return (
|
|
1388
|
-
const
|
|
1387
|
+
return (d, c) => {
|
|
1388
|
+
const A = E("FmChip"), f = E("FmSearch"), e = E("FmTable"), o = E("FmButton"), B = E("FmSideSheet");
|
|
1389
1389
|
return w(), X(B, {
|
|
1390
|
-
modelValue:
|
|
1391
|
-
"onUpdate:modelValue":
|
|
1392
|
-
header:
|
|
1390
|
+
modelValue: I(y),
|
|
1391
|
+
"onUpdate:modelValue": c[6] || (c[6] = (L) => se(y) ? y.value = L : null),
|
|
1392
|
+
header: I(C)("inventory.integration.netsuite.title"),
|
|
1393
1393
|
"dismiss-away": "",
|
|
1394
1394
|
"close-button": "",
|
|
1395
1395
|
"max-width": 800
|
|
1396
1396
|
}, {
|
|
1397
|
-
default:
|
|
1397
|
+
default: R(() => {
|
|
1398
1398
|
var L;
|
|
1399
1399
|
return [
|
|
1400
|
-
(L =
|
|
1401
|
-
|
|
1400
|
+
(L = I(s).sessionUser.value) != null && L.role.isAdmin ? (w(), V("div", ln, [
|
|
1401
|
+
c[7] || (c[7] = a("div", { class: "text-sm" }, " This integration keeps your FeedMe system and NetSuite in sync for the following modules: ", -1)),
|
|
1402
1402
|
a("div", rn, [
|
|
1403
|
-
(w(),
|
|
1404
|
-
key:
|
|
1405
|
-
label:
|
|
1403
|
+
(w(), V(J, null, $(k, (N) => x(A, {
|
|
1404
|
+
key: N,
|
|
1405
|
+
label: N,
|
|
1406
1406
|
compact: ""
|
|
1407
1407
|
}, null, 8, ["label"])), 64))
|
|
1408
1408
|
]),
|
|
1409
|
-
|
|
1410
|
-
|
|
1409
|
+
c[8] || (c[8] = a("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)),
|
|
1410
|
+
c[9] || (c[9] = a("hr", { class: "my-3" }, null, -1)),
|
|
1411
1411
|
a("div", un, [
|
|
1412
|
-
|
|
1412
|
+
x(f, {
|
|
1413
1413
|
placeholder: "Search by [NetSuite Location]",
|
|
1414
1414
|
class: "w-[300px]",
|
|
1415
1415
|
modelValue: l.value,
|
|
1416
|
-
"onUpdate:modelValue":
|
|
1416
|
+
"onUpdate:modelValue": c[0] || (c[0] = (N) => l.value = N)
|
|
1417
1417
|
}, null, 8, ["modelValue"])
|
|
1418
1418
|
]),
|
|
1419
|
-
|
|
1420
|
-
modelValue:
|
|
1421
|
-
"onUpdate:modelValue":
|
|
1422
|
-
"row-data":
|
|
1423
|
-
"column-defs":
|
|
1419
|
+
x(e, {
|
|
1420
|
+
modelValue: v.value,
|
|
1421
|
+
"onUpdate:modelValue": c[1] || (c[1] = (N) => v.value = N),
|
|
1422
|
+
"row-data": r.value,
|
|
1423
|
+
"column-defs": h,
|
|
1424
1424
|
"shrink-at": !1,
|
|
1425
1425
|
"search-value": l.value
|
|
1426
1426
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
1427
|
-
])) : (w(),
|
|
1428
|
-
|
|
1427
|
+
])) : (w(), V("div", an, " Please contact your administrator to apply the changes. ")),
|
|
1428
|
+
x(sn, {
|
|
1429
1429
|
"show-dialog": n.value,
|
|
1430
1430
|
"onUpdate:showDialog": [
|
|
1431
|
-
|
|
1432
|
-
|
|
1431
|
+
c[2] || (c[2] = (N) => n.value = N),
|
|
1432
|
+
c[3] || (c[3] = (N) => n.value = N)
|
|
1433
1433
|
],
|
|
1434
|
-
formRef:
|
|
1434
|
+
formRef: S.value,
|
|
1435
1435
|
fmLocationNotYetConfigured: p.value,
|
|
1436
1436
|
nsLocationsNotBeingUsed: m.value
|
|
1437
1437
|
}, null, 8, ["show-dialog", "formRef", "fmLocationNotYetConfigured", "nsLocationsNotBeingUsed"])
|
|
1438
1438
|
];
|
|
1439
1439
|
}),
|
|
1440
|
-
"side-sheet-footer":
|
|
1441
|
-
a("div",
|
|
1442
|
-
|
|
1440
|
+
"side-sheet-footer": R(() => [
|
|
1441
|
+
a("div", cn, [
|
|
1442
|
+
x(o, {
|
|
1443
1443
|
label: "Add location",
|
|
1444
|
-
onClick:
|
|
1445
|
-
loading:
|
|
1446
|
-
disabled:
|
|
1444
|
+
onClick: c[4] || (c[4] = (L) => n.value = !0),
|
|
1445
|
+
loading: d.loading,
|
|
1446
|
+
disabled: d.loading
|
|
1447
1447
|
}, null, 8, ["loading", "disabled"]),
|
|
1448
|
-
|
|
1448
|
+
x(o, {
|
|
1449
1449
|
variant: "tertiary",
|
|
1450
|
-
label:
|
|
1451
|
-
onClick:
|
|
1450
|
+
label: I(C)("common.close"),
|
|
1451
|
+
onClick: c[5] || (c[5] = (L) => u("update:show", !1))
|
|
1452
1452
|
}, null, 8, ["label"])
|
|
1453
1453
|
])
|
|
1454
1454
|
]),
|
|
@@ -1464,23 +1464,23 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1464
1464
|
},
|
|
1465
1465
|
emits: ["update:modelValue"],
|
|
1466
1466
|
setup(F) {
|
|
1467
|
-
const { t:
|
|
1467
|
+
const { t: g } = de(), s = Se(F, "modelValue"), i = [
|
|
1468
1468
|
{
|
|
1469
1469
|
id: "Code",
|
|
1470
|
-
header: () =>
|
|
1470
|
+
header: () => g("inventory.transfer.form.items.table.Code"),
|
|
1471
1471
|
accessorKey: "code",
|
|
1472
1472
|
size: 200,
|
|
1473
1473
|
cell(n) {
|
|
1474
1474
|
const t = n.row.original;
|
|
1475
|
-
return
|
|
1476
|
-
|
|
1475
|
+
return D(
|
|
1476
|
+
ne.FmTooltip,
|
|
1477
1477
|
{
|
|
1478
1478
|
content: t.code,
|
|
1479
1479
|
placement: "top",
|
|
1480
1480
|
variant: "plain",
|
|
1481
1481
|
zIndex: 50
|
|
1482
1482
|
},
|
|
1483
|
-
|
|
1483
|
+
D(
|
|
1484
1484
|
"span",
|
|
1485
1485
|
{
|
|
1486
1486
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1493,19 +1493,19 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1493
1493
|
},
|
|
1494
1494
|
{
|
|
1495
1495
|
id: "Name",
|
|
1496
|
-
header: () =>
|
|
1496
|
+
header: () => g("inventory.transfer.form.items.table.Name"),
|
|
1497
1497
|
minSize: 300,
|
|
1498
1498
|
cell(n) {
|
|
1499
1499
|
const t = n.row.original;
|
|
1500
|
-
return
|
|
1501
|
-
|
|
1500
|
+
return D(
|
|
1501
|
+
ne.FmTooltip,
|
|
1502
1502
|
{
|
|
1503
1503
|
content: t.name,
|
|
1504
1504
|
placement: "top",
|
|
1505
1505
|
variant: "plain",
|
|
1506
1506
|
zIndex: 50
|
|
1507
1507
|
},
|
|
1508
|
-
|
|
1508
|
+
D(
|
|
1509
1509
|
"span",
|
|
1510
1510
|
{
|
|
1511
1511
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
@@ -1518,11 +1518,11 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1518
1518
|
},
|
|
1519
1519
|
{
|
|
1520
1520
|
id: "Amount",
|
|
1521
|
-
header: () =>
|
|
1521
|
+
header: () => g("inventory.transfer.form.items.table.Amount"),
|
|
1522
1522
|
minSize: 200,
|
|
1523
1523
|
cell(n) {
|
|
1524
|
-
const t = n.row.original,
|
|
1525
|
-
return
|
|
1524
|
+
const t = n.row.original, u = n.row.index;
|
|
1525
|
+
return D($e, {
|
|
1526
1526
|
style: {
|
|
1527
1527
|
flex: "1 1 0%"
|
|
1528
1528
|
},
|
|
@@ -1532,17 +1532,17 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1532
1532
|
},
|
|
1533
1533
|
key: t.sku._id,
|
|
1534
1534
|
unit: t.sku.unit,
|
|
1535
|
-
"onUpdate:modelValue": (
|
|
1536
|
-
if (!
|
|
1537
|
-
const
|
|
1535
|
+
"onUpdate:modelValue": (b) => {
|
|
1536
|
+
if (!b) return;
|
|
1537
|
+
const S = {
|
|
1538
1538
|
...t,
|
|
1539
|
-
quantity:
|
|
1540
|
-
measurement:
|
|
1539
|
+
quantity: b.amount,
|
|
1540
|
+
measurement: b.measurement
|
|
1541
1541
|
};
|
|
1542
1542
|
s.value = [
|
|
1543
|
-
...s.value.slice(0,
|
|
1544
|
-
|
|
1545
|
-
...s.value.slice(
|
|
1543
|
+
...s.value.slice(0, u),
|
|
1544
|
+
S,
|
|
1545
|
+
...s.value.slice(u + 1)
|
|
1546
1546
|
];
|
|
1547
1547
|
},
|
|
1548
1548
|
rules: [et(+Qe({ amount: 1, precision: 0 }))],
|
|
@@ -1555,9 +1555,9 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1555
1555
|
id: "Delete",
|
|
1556
1556
|
header: "",
|
|
1557
1557
|
cell(n) {
|
|
1558
|
-
const t = n.row.original,
|
|
1559
|
-
return
|
|
1560
|
-
|
|
1558
|
+
const t = n.row.original, u = n.row.index;
|
|
1559
|
+
return D("div", { class: "flex justify-end" }, [
|
|
1560
|
+
D(ne.FmButton, {
|
|
1561
1561
|
key: t.sku._id,
|
|
1562
1562
|
class: "delete-button",
|
|
1563
1563
|
type: "button",
|
|
@@ -1565,7 +1565,7 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1565
1565
|
variant: "tertiary",
|
|
1566
1566
|
size: "md",
|
|
1567
1567
|
onClick: () => {
|
|
1568
|
-
s.value = [...s.value.slice(0,
|
|
1568
|
+
s.value = [...s.value.slice(0, u), ...s.value.slice(u + 1)];
|
|
1569
1569
|
}
|
|
1570
1570
|
})
|
|
1571
1571
|
]);
|
|
@@ -1579,12 +1579,12 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1579
1579
|
}
|
|
1580
1580
|
];
|
|
1581
1581
|
return (n, t) => {
|
|
1582
|
-
const
|
|
1583
|
-
return w(), X(
|
|
1584
|
-
"column-defs":
|
|
1582
|
+
const u = E("FmTable");
|
|
1583
|
+
return w(), X(u, {
|
|
1584
|
+
"column-defs": i,
|
|
1585
1585
|
"row-data": s.value,
|
|
1586
|
-
"row-key": (
|
|
1587
|
-
"empty-text":
|
|
1586
|
+
"row-key": (b) => b.sku._id,
|
|
1587
|
+
"empty-text": I(g)("inventory.transfer.form.items.table.empty"),
|
|
1588
1588
|
pagination: !1,
|
|
1589
1589
|
"virtual-scroll": { enabled: !0, itemSize: 48 }
|
|
1590
1590
|
}, null, 8, ["row-data", "row-key", "empty-text"]);
|
|
@@ -1593,41 +1593,41 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1593
1593
|
}), fn = { class: "flex items-center gap-8 mb-8" }, pn = /* @__PURE__ */ Y({
|
|
1594
1594
|
__name: "InventoryTransferOutTable",
|
|
1595
1595
|
setup(F) {
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1598
|
-
const
|
|
1599
|
-
l.setDate(l.getDate() - 30),
|
|
1596
|
+
const g = M([]), s = ge(), i = M(!1), n = M(!1), t = te(), u = W();
|
|
1597
|
+
fe(async () => {
|
|
1598
|
+
const v = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1599
|
+
l.setDate(l.getDate() - 30), i.value = !0;
|
|
1600
1600
|
try {
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1601
|
+
const r = await s.getInventoryTransferHistory(
|
|
1602
|
+
u.currentLocationDBName,
|
|
1603
1603
|
l,
|
|
1604
|
-
|
|
1604
|
+
v
|
|
1605
1605
|
);
|
|
1606
|
-
|
|
1607
|
-
} catch (
|
|
1608
|
-
console.error("Error fetching inventory transfer history:",
|
|
1606
|
+
g.value = r;
|
|
1607
|
+
} catch (r) {
|
|
1608
|
+
console.error("Error fetching inventory transfer history:", r);
|
|
1609
1609
|
} finally {
|
|
1610
|
-
|
|
1610
|
+
i.value = !1;
|
|
1611
1611
|
}
|
|
1612
1612
|
});
|
|
1613
|
-
async function
|
|
1613
|
+
async function b() {
|
|
1614
1614
|
try {
|
|
1615
|
-
n.value = !0, await s.manualSyncInventoryTransfer(
|
|
1615
|
+
n.value = !0, await s.manualSyncInventoryTransfer(u.currentLocationDBName), t == null || t.open({
|
|
1616
1616
|
title: "Sync Started",
|
|
1617
1617
|
message: "Inventory transfers sync queued successfully.",
|
|
1618
1618
|
type: "success"
|
|
1619
1619
|
});
|
|
1620
|
-
} catch (
|
|
1620
|
+
} catch (v) {
|
|
1621
1621
|
t == null || t.open({
|
|
1622
1622
|
title: "Sync Failed",
|
|
1623
|
-
message: `Failed to queue inventory transfers sync. ${
|
|
1623
|
+
message: `Failed to queue inventory transfers sync. ${v == null ? void 0 : v.message}`,
|
|
1624
1624
|
type: "error"
|
|
1625
1625
|
});
|
|
1626
1626
|
} finally {
|
|
1627
1627
|
n.value = !1;
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
const
|
|
1630
|
+
const S = [
|
|
1631
1631
|
// {
|
|
1632
1632
|
// id: 'type',
|
|
1633
1633
|
// header: 'Type',
|
|
@@ -1638,17 +1638,17 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1638
1638
|
{
|
|
1639
1639
|
id: "destinationLocation",
|
|
1640
1640
|
header: "Destination Location",
|
|
1641
|
-
cell: (
|
|
1642
|
-
const l =
|
|
1643
|
-
return l ?
|
|
1644
|
-
|
|
1641
|
+
cell: (v) => {
|
|
1642
|
+
const l = v.row.original.destinationLocation.netSuiteName;
|
|
1643
|
+
return l ? D(
|
|
1644
|
+
ne.FmTooltip,
|
|
1645
1645
|
{ zIndex: 51 },
|
|
1646
1646
|
{
|
|
1647
1647
|
content() {
|
|
1648
1648
|
return l;
|
|
1649
1649
|
},
|
|
1650
1650
|
default() {
|
|
1651
|
-
return
|
|
1651
|
+
return D("div", { class: "line-clamp-2 fm-typo-en-body-sm-400" }, l);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
1654
|
) : "N/A";
|
|
@@ -1657,22 +1657,22 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1657
1657
|
{
|
|
1658
1658
|
id: "netsuite",
|
|
1659
1659
|
header: () => "NetSuite",
|
|
1660
|
-
cell(
|
|
1661
|
-
return
|
|
1662
|
-
|
|
1660
|
+
cell(v) {
|
|
1661
|
+
return D("div", { class: "flex flex-col" }, [
|
|
1662
|
+
D(
|
|
1663
1663
|
"span",
|
|
1664
1664
|
{ class: "fm-typo-en-body-sm-400" },
|
|
1665
|
-
`ID: ${
|
|
1665
|
+
`ID: ${v.row.original.netsuiteId ?? "N/A"}`
|
|
1666
1666
|
),
|
|
1667
|
-
|
|
1667
|
+
D(
|
|
1668
1668
|
"span",
|
|
1669
1669
|
{ class: "fm-typo-en-body-sm-400" },
|
|
1670
|
-
`Transaction ID: ${
|
|
1670
|
+
`Transaction ID: ${v.row.original.netsuiteTranId ?? "N/A"}`
|
|
1671
1671
|
),
|
|
1672
|
-
|
|
1672
|
+
D(
|
|
1673
1673
|
"span",
|
|
1674
1674
|
{ class: "fm-typo-en-body-sm-400" },
|
|
1675
|
-
`Transaction Date: ${
|
|
1675
|
+
`Transaction Date: ${v.row.original.netsuiteTranDate ?? "N/A"}`
|
|
1676
1676
|
)
|
|
1677
1677
|
]);
|
|
1678
1678
|
}
|
|
@@ -1680,14 +1680,14 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1680
1680
|
{
|
|
1681
1681
|
id: "adjustment",
|
|
1682
1682
|
header: () => "Adjustment (FeedMe)",
|
|
1683
|
-
cell(
|
|
1684
|
-
const l =
|
|
1685
|
-
return
|
|
1686
|
-
|
|
1687
|
-
|
|
1683
|
+
cell(v) {
|
|
1684
|
+
const l = v.row.original.adjustmentId;
|
|
1685
|
+
return D("div", { class: "flex flex-col" }, [
|
|
1686
|
+
D("span", { class: "fm-typo-en-body-sm-400" }, `ID: ${l ?? "N/A"}`),
|
|
1687
|
+
D(
|
|
1688
1688
|
"span",
|
|
1689
1689
|
{ class: "fm-typo-en-body-sm-400" },
|
|
1690
|
-
`Date: ${l ?
|
|
1690
|
+
`Date: ${l ? ye(Ae(l)) : "N/A"}`
|
|
1691
1691
|
)
|
|
1692
1692
|
]);
|
|
1693
1693
|
}
|
|
@@ -1695,17 +1695,17 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1695
1695
|
{
|
|
1696
1696
|
id: "items",
|
|
1697
1697
|
header: () => "Items",
|
|
1698
|
-
cell(
|
|
1699
|
-
const l =
|
|
1700
|
-
return
|
|
1698
|
+
cell(v) {
|
|
1699
|
+
const l = v.row.original.items;
|
|
1700
|
+
return D(
|
|
1701
1701
|
"div",
|
|
1702
1702
|
{ class: "overflow-auto" },
|
|
1703
|
-
|
|
1703
|
+
D("ul", { class: "list-disc pl-5" }, [
|
|
1704
1704
|
l == null ? void 0 : l.map(
|
|
1705
|
-
(
|
|
1705
|
+
(r) => D(
|
|
1706
1706
|
"li",
|
|
1707
1707
|
{ class: "fm-typo-en-body-sm-400" },
|
|
1708
|
-
`[${
|
|
1708
|
+
`[${r == null ? void 0 : r.itemId}] ${r == null ? void 0 : r.itemName}: ${r == null ? void 0 : r.quantity} ${(r == null ? void 0 : r.uomName) ?? "N/A"}`
|
|
1709
1709
|
)
|
|
1710
1710
|
)
|
|
1711
1711
|
])
|
|
@@ -1713,13 +1713,13 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1713
1713
|
},
|
|
1714
1714
|
size: 150
|
|
1715
1715
|
}
|
|
1716
|
-
],
|
|
1717
|
-
return (
|
|
1718
|
-
const
|
|
1719
|
-
return w(),
|
|
1716
|
+
], y = M();
|
|
1717
|
+
return (v, l) => {
|
|
1718
|
+
const r = E("FmButton"), h = E("FmTable");
|
|
1719
|
+
return w(), V(J, null, [
|
|
1720
1720
|
a("div", fn, [
|
|
1721
1721
|
l[1] || (l[1] = a("span", null, "Last 30 Days:", -1)),
|
|
1722
|
-
|
|
1722
|
+
x(r, {
|
|
1723
1723
|
"prepend-icon": "sync",
|
|
1724
1724
|
variant: "secondary",
|
|
1725
1725
|
label: "Sync",
|
|
@@ -1727,15 +1727,15 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1727
1727
|
"text-color": "primary",
|
|
1728
1728
|
"bg-color": "transparent",
|
|
1729
1729
|
"border-color": "primary",
|
|
1730
|
-
onClick:
|
|
1730
|
+
onClick: b
|
|
1731
1731
|
}, null, 8, ["loading"])
|
|
1732
1732
|
]),
|
|
1733
|
-
|
|
1734
|
-
modelValue:
|
|
1735
|
-
"onUpdate:modelValue": l[0] || (l[0] = (C) =>
|
|
1736
|
-
"row-data":
|
|
1737
|
-
"column-defs":
|
|
1738
|
-
loading:
|
|
1733
|
+
x(h, {
|
|
1734
|
+
modelValue: y.value,
|
|
1735
|
+
"onUpdate:modelValue": l[0] || (l[0] = (C) => y.value = C),
|
|
1736
|
+
"row-data": g.value,
|
|
1737
|
+
"column-defs": S,
|
|
1738
|
+
loading: i.value
|
|
1739
1739
|
}, null, 8, ["modelValue", "row-data", "loading"])
|
|
1740
1740
|
], 64);
|
|
1741
1741
|
};
|
|
@@ -1746,7 +1746,7 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1746
1746
|
}, yn = { class: "flex gap-2" }, An = {
|
|
1747
1747
|
key: 1,
|
|
1748
1748
|
class: "flex items-center my-2 border rounded-lg p-2"
|
|
1749
|
-
}, bn = { class: "flex flex-col" }, hn = { class: "font-medium" },
|
|
1749
|
+
}, bn = { class: "flex flex-col" }, hn = { class: "font-medium" }, xn = { class: "text-xs text-gray-400" }, In = { class: "text-xs text-gray-400" }, Sn = { class: "flex my-4" }, wn = { class: "flex" }, kn = {
|
|
1750
1750
|
key: 1,
|
|
1751
1751
|
class: "flex flex-col"
|
|
1752
1752
|
}, Bn = {
|
|
@@ -1760,55 +1760,55 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1760
1760
|
currentLocationSubsidiary: {}
|
|
1761
1761
|
},
|
|
1762
1762
|
setup(F) {
|
|
1763
|
-
const
|
|
1764
|
-
const
|
|
1765
|
-
return
|
|
1763
|
+
const g = ce(), s = le(), i = be(), n = ge(), t = te(), { t: u } = de(), b = M([]), S = [{ label: "Transfer Out" }, { label: "History" }], y = M(S[0]), v = M(!1), l = M(null), r = M(null), h = F, C = z(() => {
|
|
1764
|
+
const A = s.currentLocationSetting, f = s.configuredLocations;
|
|
1765
|
+
return h.nsLocations.map((e) => ({
|
|
1766
1766
|
label: e.name,
|
|
1767
1767
|
value: e,
|
|
1768
|
-
disabled: f.some((o) => o.netSuiteId === e.netsuiteId) || e.subsidiaryId !== (
|
|
1768
|
+
disabled: f.some((o) => o.netSuiteId === e.netsuiteId) || e.subsidiaryId !== (A == null ? void 0 : A.subsidiaryId)
|
|
1769
1769
|
}));
|
|
1770
|
-
}),
|
|
1770
|
+
}), k = z({
|
|
1771
1771
|
get() {
|
|
1772
1772
|
return l.value ? l.value.toISOString().slice(0, 10) : "";
|
|
1773
1773
|
},
|
|
1774
|
-
set(
|
|
1775
|
-
if (!
|
|
1774
|
+
set(A) {
|
|
1775
|
+
if (!A) {
|
|
1776
1776
|
l.value = null;
|
|
1777
1777
|
return;
|
|
1778
1778
|
}
|
|
1779
|
-
const f = l.value ?? /* @__PURE__ */ new Date(), e = new Date(
|
|
1779
|
+
const f = l.value ?? /* @__PURE__ */ new Date(), e = new Date(A);
|
|
1780
1780
|
f.setFullYear(e.getFullYear(), e.getMonth(), e.getDate()), l.value = new Date(f);
|
|
1781
1781
|
}
|
|
1782
1782
|
}), p = z({
|
|
1783
1783
|
get() {
|
|
1784
1784
|
if (!l.value) return null;
|
|
1785
|
-
const
|
|
1786
|
-
return `${
|
|
1785
|
+
const A = String(l.value.getHours()).padStart(2, "0"), f = String(l.value.getMinutes()).padStart(2, "0");
|
|
1786
|
+
return `${A}:${f}`;
|
|
1787
1787
|
},
|
|
1788
|
-
set(
|
|
1789
|
-
if (!
|
|
1790
|
-
const [f, e] =
|
|
1788
|
+
set(A) {
|
|
1789
|
+
if (!A) return;
|
|
1790
|
+
const [f, e] = A.split(":").map(Number), o = l.value ?? /* @__PURE__ */ new Date();
|
|
1791
1791
|
o.setHours(f, e), l.value = new Date(o);
|
|
1792
1792
|
}
|
|
1793
|
-
}), m = z(() =>
|
|
1794
|
-
async function
|
|
1793
|
+
}), m = z(() => k.value && p.value && r.value && b.value.length > 0 && !v.value);
|
|
1794
|
+
async function d() {
|
|
1795
1795
|
if (m.value) {
|
|
1796
|
-
if (!
|
|
1796
|
+
if (!h.currentLocationSetting) {
|
|
1797
1797
|
t.open({
|
|
1798
1798
|
message: "Current location setting is not available",
|
|
1799
1799
|
type: "error"
|
|
1800
1800
|
});
|
|
1801
1801
|
return;
|
|
1802
1802
|
}
|
|
1803
|
-
|
|
1803
|
+
v.value = !0;
|
|
1804
1804
|
try {
|
|
1805
|
-
const
|
|
1806
|
-
items:
|
|
1805
|
+
const A = {
|
|
1806
|
+
items: b.value,
|
|
1807
1807
|
date: l.value.toISOString(),
|
|
1808
|
-
netsuiteLocationId:
|
|
1809
|
-
netsuiteLocationName:
|
|
1810
|
-
}, f = `${
|
|
1811
|
-
await n.createInventoryTransfer(f,
|
|
1808
|
+
netsuiteLocationId: r.value.netsuiteId,
|
|
1809
|
+
netsuiteLocationName: r.value.name
|
|
1810
|
+
}, f = `${h.currentLocationSetting.type}_${h.currentLocationSetting.id}`;
|
|
1811
|
+
await n.createInventoryTransfer(f, A), b.value = [], l.value = null, r.value = null, t.open({
|
|
1812
1812
|
message: "Inventort transfer created successfully",
|
|
1813
1813
|
type: "success"
|
|
1814
1814
|
});
|
|
@@ -1818,12 +1818,12 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1818
1818
|
type: "error"
|
|
1819
1819
|
});
|
|
1820
1820
|
} finally {
|
|
1821
|
-
|
|
1821
|
+
v.value = !1;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const
|
|
1825
|
+
function c() {
|
|
1826
|
+
const A = s.currentLocationSubsidiary(), f = s.getAvailableItems(A.id), e = i.skus.filter((L) => f.includes(L._id)).map((L) => L._id), o = i.skus.map(
|
|
1827
1827
|
(L) => ({
|
|
1828
1828
|
label: L.name,
|
|
1829
1829
|
sublabel: L.code,
|
|
@@ -1831,11 +1831,11 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1831
1831
|
disabled: !e.includes(L._id)
|
|
1832
1832
|
})
|
|
1833
1833
|
), B = o.filter((L) => {
|
|
1834
|
-
var
|
|
1835
|
-
return (
|
|
1834
|
+
var N;
|
|
1835
|
+
return (N = b.value) == null ? void 0 : N.find((H) => H.sku._id === L.value._id);
|
|
1836
1836
|
}).map((L) => L.value);
|
|
1837
|
-
|
|
1838
|
-
title:
|
|
1837
|
+
g.open({
|
|
1838
|
+
title: u("inventory.transfer.form.items.selectItem"),
|
|
1839
1839
|
closeButton: !0,
|
|
1840
1840
|
contentComponent: Ye,
|
|
1841
1841
|
contentComponentProps: {
|
|
@@ -1844,18 +1844,18 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1844
1844
|
virtualScroll: !0
|
|
1845
1845
|
},
|
|
1846
1846
|
primaryActions: {
|
|
1847
|
-
text:
|
|
1847
|
+
text: u("common.confirm"),
|
|
1848
1848
|
close: !0
|
|
1849
1849
|
},
|
|
1850
1850
|
secondaryActions: {
|
|
1851
|
-
text:
|
|
1851
|
+
text: u("common.close"),
|
|
1852
1852
|
close: !0,
|
|
1853
1853
|
variant: "tertiary"
|
|
1854
1854
|
}
|
|
1855
1855
|
}).onPrimary((L) => {
|
|
1856
|
-
const
|
|
1857
|
-
const
|
|
1858
|
-
return
|
|
1856
|
+
const N = b.value, H = L.map((U) => {
|
|
1857
|
+
const O = N.find((Q) => Q.sku._id === U._id);
|
|
1858
|
+
return O || {
|
|
1859
1859
|
sku: U,
|
|
1860
1860
|
code: U.code,
|
|
1861
1861
|
name: U.name,
|
|
@@ -1865,89 +1865,89 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1865
1865
|
}
|
|
1866
1866
|
};
|
|
1867
1867
|
});
|
|
1868
|
-
H.sort((U,
|
|
1868
|
+
H.sort((U, O) => U.sku.code.localeCompare(O.sku.code)), b.value = H;
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
|
-
return (
|
|
1872
|
-
const e = E("FmButtonGroup"), o = E("FmLabel"), B = E("FmField"), L = E("FmSimpleDatePicker"),
|
|
1873
|
-
return w(),
|
|
1874
|
-
|
|
1875
|
-
modelValue:
|
|
1876
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
1877
|
-
items:
|
|
1871
|
+
return (A, f) => {
|
|
1872
|
+
const e = E("FmButtonGroup"), o = E("FmLabel"), B = E("FmField"), L = E("FmSimpleDatePicker"), N = E("FmTimePicker"), H = E("FmSelect"), U = E("FmIcon"), O = E("FmButton");
|
|
1873
|
+
return w(), V("div", vn, [
|
|
1874
|
+
x(e, {
|
|
1875
|
+
modelValue: y.value,
|
|
1876
|
+
"onUpdate:modelValue": f[0] || (f[0] = (T) => y.value = T),
|
|
1877
|
+
items: S
|
|
1878
1878
|
}, null, 8, ["modelValue"]),
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
default:
|
|
1879
|
+
y.value.label === "Transfer Out" ? (w(), V(J, { key: 0 }, [
|
|
1880
|
+
I(s).inventoryTransferOutEnabled ? (w(), V("div", gn, [
|
|
1881
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1882
|
+
default: R(() => f[6] || (f[6] = [
|
|
1883
1883
|
Z("Type")
|
|
1884
1884
|
])),
|
|
1885
1885
|
_: 1
|
|
1886
1886
|
}),
|
|
1887
|
-
|
|
1887
|
+
x(B, {
|
|
1888
1888
|
class: "my-4",
|
|
1889
1889
|
disabled: "",
|
|
1890
1890
|
"prepend-icon": "lock"
|
|
1891
1891
|
}, {
|
|
1892
|
-
default:
|
|
1892
|
+
default: R(() => f[7] || (f[7] = [
|
|
1893
1893
|
Z("Transfer out")
|
|
1894
1894
|
])),
|
|
1895
1895
|
_: 1
|
|
1896
1896
|
}),
|
|
1897
|
-
|
|
1898
|
-
default:
|
|
1897
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1898
|
+
default: R(() => f[8] || (f[8] = [
|
|
1899
1899
|
Z("Subsidiary")
|
|
1900
1900
|
])),
|
|
1901
1901
|
_: 1
|
|
1902
1902
|
}),
|
|
1903
|
-
|
|
1903
|
+
x(B, {
|
|
1904
1904
|
class: "my-4",
|
|
1905
1905
|
disabled: "",
|
|
1906
1906
|
"prepend-icon": "lock"
|
|
1907
1907
|
}, {
|
|
1908
|
-
default:
|
|
1909
|
-
Z(
|
|
1908
|
+
default: R(() => [
|
|
1909
|
+
Z(j(A.currentLocationSubsidiary.fullName), 1)
|
|
1910
1910
|
]),
|
|
1911
1911
|
_: 1
|
|
1912
1912
|
}),
|
|
1913
|
-
|
|
1914
|
-
default:
|
|
1913
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1914
|
+
default: R(() => f[9] || (f[9] = [
|
|
1915
1915
|
Z("Transaction date")
|
|
1916
1916
|
])),
|
|
1917
1917
|
_: 1
|
|
1918
1918
|
}),
|
|
1919
|
-
|
|
1920
|
-
modelValue:
|
|
1921
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
1919
|
+
x(L, {
|
|
1920
|
+
modelValue: k.value,
|
|
1921
|
+
"onUpdate:modelValue": f[1] || (f[1] = (T) => k.value = T)
|
|
1922
1922
|
}, null, 8, ["modelValue"]),
|
|
1923
|
-
|
|
1924
|
-
default:
|
|
1923
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1924
|
+
default: R(() => f[10] || (f[10] = [
|
|
1925
1925
|
Z("Transaction time")
|
|
1926
1926
|
])),
|
|
1927
1927
|
_: 1
|
|
1928
1928
|
}),
|
|
1929
|
-
|
|
1929
|
+
x(N, {
|
|
1930
1930
|
modelValue: p.value,
|
|
1931
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
1931
|
+
"onUpdate:modelValue": f[2] || (f[2] = (T) => p.value = T)
|
|
1932
1932
|
}, null, 8, ["modelValue"]),
|
|
1933
|
-
|
|
1934
|
-
default:
|
|
1933
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1934
|
+
default: R(() => f[11] || (f[11] = [
|
|
1935
1935
|
Z("NetSuite Location")
|
|
1936
1936
|
])),
|
|
1937
1937
|
_: 1
|
|
1938
1938
|
}),
|
|
1939
1939
|
a("div", yn, [
|
|
1940
|
-
|
|
1940
|
+
r.value ? _("", !0) : (w(), X(H, {
|
|
1941
1941
|
key: 0,
|
|
1942
1942
|
class: "my-4 w-full",
|
|
1943
|
-
modelValue:
|
|
1944
|
-
"onUpdate:modelValue": f[3] || (f[3] = (
|
|
1943
|
+
modelValue: r.value,
|
|
1944
|
+
"onUpdate:modelValue": f[3] || (f[3] = (T) => r.value = T),
|
|
1945
1945
|
searchable: "",
|
|
1946
1946
|
searchTarget: "label",
|
|
1947
1947
|
items: C.value
|
|
1948
1948
|
}, null, 8, ["modelValue", "items"])),
|
|
1949
|
-
|
|
1950
|
-
|
|
1949
|
+
r.value ? (w(), V("div", An, [
|
|
1950
|
+
x(U, {
|
|
1951
1951
|
name: "cloud",
|
|
1952
1952
|
color: "neutral-gray-400",
|
|
1953
1953
|
size: "md",
|
|
@@ -1955,58 +1955,109 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
1955
1955
|
outline: ""
|
|
1956
1956
|
}),
|
|
1957
1957
|
a("div", bn, [
|
|
1958
|
-
a("span", hn,
|
|
1959
|
-
a("span",
|
|
1960
|
-
a("span",
|
|
1958
|
+
a("span", hn, j(r.value.name), 1),
|
|
1959
|
+
a("span", xn, "ID: " + j(r.value.netsuiteId), 1),
|
|
1960
|
+
a("span", In, "Subsidiary: " + j(r.value.subsidiaryName), 1)
|
|
1961
1961
|
]),
|
|
1962
|
-
|
|
1962
|
+
x(O, {
|
|
1963
1963
|
class: "ml-2",
|
|
1964
1964
|
variant: "secondary",
|
|
1965
1965
|
label: "Clear",
|
|
1966
|
-
onClick: f[4] || (f[4] = (
|
|
1966
|
+
onClick: f[4] || (f[4] = (T) => r.value = null)
|
|
1967
1967
|
})
|
|
1968
1968
|
])) : _("", !0)
|
|
1969
1969
|
]),
|
|
1970
1970
|
a("div", Sn, [
|
|
1971
|
-
|
|
1971
|
+
x(O, {
|
|
1972
1972
|
class: "ml-auto",
|
|
1973
1973
|
variant: "secondary",
|
|
1974
1974
|
"prepend-icon": "add",
|
|
1975
1975
|
label: "Ingredients",
|
|
1976
|
-
onClick:
|
|
1976
|
+
onClick: c
|
|
1977
1977
|
})
|
|
1978
1978
|
]),
|
|
1979
|
-
|
|
1980
|
-
modelValue:
|
|
1981
|
-
"onUpdate:modelValue": f[5] || (f[5] = (
|
|
1979
|
+
x(mn, {
|
|
1980
|
+
modelValue: b.value,
|
|
1981
|
+
"onUpdate:modelValue": f[5] || (f[5] = (T) => b.value = T)
|
|
1982
1982
|
}, null, 8, ["modelValue"]),
|
|
1983
1983
|
a("div", wn, [
|
|
1984
|
-
|
|
1984
|
+
x(O, {
|
|
1985
1985
|
class: "ml-auto mt-4",
|
|
1986
1986
|
variant: "primary",
|
|
1987
1987
|
"prepend-icon": "add",
|
|
1988
1988
|
label: "Create",
|
|
1989
1989
|
disabled: !m.value,
|
|
1990
|
-
loading:
|
|
1991
|
-
onClick:
|
|
1990
|
+
loading: v.value,
|
|
1991
|
+
onClick: d
|
|
1992
1992
|
}, null, 8, ["disabled", "loading"])
|
|
1993
1993
|
])
|
|
1994
|
-
])) : (w(),
|
|
1995
|
-
|
|
1996
|
-
default:
|
|
1994
|
+
])) : (w(), V("div", kn, [
|
|
1995
|
+
x(o, { class: "fm-typo-en-body-md-600" }, {
|
|
1996
|
+
default: R(() => f[12] || (f[12] = [
|
|
1997
1997
|
Z(" Feature is not enabled. Please contact your administrator. ")
|
|
1998
1998
|
])),
|
|
1999
1999
|
_: 1
|
|
2000
2000
|
})
|
|
2001
2001
|
]))
|
|
2002
2002
|
], 64)) : _("", !0),
|
|
2003
|
-
|
|
2004
|
-
|
|
2003
|
+
y.value.label === "History" ? (w(), V("div", Bn, [
|
|
2004
|
+
x(pn)
|
|
2005
|
+
])) : _("", !0)
|
|
2006
|
+
]);
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
}), En = { class: "flex flex-col gap-8" }, Fn = {
|
|
2010
|
+
key: 0,
|
|
2011
|
+
class: "flex flex-col gap-4"
|
|
2012
|
+
}, Ln = { style: { "list-style-type": "initial", "padding-left": "1rem" } }, Vn = /* @__PURE__ */ Y({
|
|
2013
|
+
__name: "TransferOrder",
|
|
2014
|
+
props: {
|
|
2015
|
+
nsLocations: {},
|
|
2016
|
+
currentLocationSetting: {},
|
|
2017
|
+
currentLocationSubsidiary: {}
|
|
2018
|
+
},
|
|
2019
|
+
setup(F) {
|
|
2020
|
+
ce();
|
|
2021
|
+
const g = ge(), s = te(), i = M(!1), n = F, t = M([]);
|
|
2022
|
+
async function u() {
|
|
2023
|
+
var b;
|
|
2024
|
+
i.value = !0;
|
|
2025
|
+
try {
|
|
2026
|
+
const S = ((b = n.currentLocationSetting) == null ? void 0 : b.id) || "", y = await g.getUnSyncTransferInOrders(S);
|
|
2027
|
+
t.value = y, s.open({
|
|
2028
|
+
message: "Check unsync transfer in order successfully",
|
|
2029
|
+
type: "success"
|
|
2030
|
+
});
|
|
2031
|
+
} catch {
|
|
2032
|
+
s.open({
|
|
2033
|
+
message: "Failed to check unsync transfer in order",
|
|
2034
|
+
type: "error"
|
|
2035
|
+
});
|
|
2036
|
+
} finally {
|
|
2037
|
+
i.value = !1;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
return (b, S) => {
|
|
2041
|
+
const y = E("FmButton");
|
|
2042
|
+
return w(), V("div", En, [
|
|
2043
|
+
a("span", null, "Current date and time: " + j((/* @__PURE__ */ new Date()).toLocaleString()), 1),
|
|
2044
|
+
x(y, {
|
|
2045
|
+
label: "Check Unsync Transfer Order (Last 2 months)",
|
|
2046
|
+
variant: "primary",
|
|
2047
|
+
onClick: u,
|
|
2048
|
+
disabled: i.value,
|
|
2049
|
+
loading: i.value
|
|
2050
|
+
}, null, 8, ["disabled", "loading"]),
|
|
2051
|
+
t.value.length > 0 ? (w(), V("div", Fn, [
|
|
2052
|
+
S[0] || (S[0] = a("p", null, "Transfer Order NetSuite ID not match with existing orders", -1)),
|
|
2053
|
+
a("ul", Ln, [
|
|
2054
|
+
(w(!0), V(J, null, $(t.value, (v) => (w(), V("li", { key: v }, j(v), 1))), 128))
|
|
2055
|
+
])
|
|
2005
2056
|
])) : _("", !0)
|
|
2006
2057
|
]);
|
|
2007
2058
|
};
|
|
2008
2059
|
}
|
|
2009
|
-
}),
|
|
2060
|
+
}), Nn = { class: "flex flex-col gap-8 w-full" }, Dn = { class: "flex gap-4 justify-between" }, Rn = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400" }, Mn = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, On = { key: 0 }, jn = { class: "flex gap-8 items-center justify-start" }, Tn = /* @__PURE__ */ Y({
|
|
2010
2061
|
__name: "NetSuiteSideSheet",
|
|
2011
2062
|
props: {
|
|
2012
2063
|
nsLocations: {},
|
|
@@ -2014,69 +2065,80 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2014
2065
|
loading: { type: Boolean }
|
|
2015
2066
|
},
|
|
2016
2067
|
emits: ["update:show"],
|
|
2017
|
-
setup(F, { emit:
|
|
2018
|
-
var
|
|
2019
|
-
const s = ie(),
|
|
2068
|
+
setup(F, { emit: g }) {
|
|
2069
|
+
var k;
|
|
2070
|
+
const s = ie(), i = le(), n = F, t = ae(n, "show"), { t: u } = G(), b = g, S = W(), y = ((k = S._currentLocation) == null ? void 0 : k.type) || "", v = [
|
|
2020
2071
|
{
|
|
2021
2072
|
label: "Inventory Transfer (Out)",
|
|
2022
2073
|
value: "inventoryTransfer"
|
|
2023
2074
|
/* INVENTORY_TRANSFER */
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
label: "Transfer Order",
|
|
2078
|
+
value: "transferOrder"
|
|
2079
|
+
/* TRANSFER_ORDER */
|
|
2024
2080
|
}
|
|
2025
|
-
], l =
|
|
2026
|
-
(p) => p.subsidiaryId ===
|
|
2081
|
+
], l = M(v[0].value), r = z(() => i.currentLocationSubsidiary()), h = z(() => i.currentLocationSetting), C = z(() => n.nsLocations.filter(
|
|
2082
|
+
(p) => p.subsidiaryId === r.value.id || p.netsuiteId === r.value.id
|
|
2027
2083
|
));
|
|
2028
2084
|
return (p, m) => {
|
|
2029
2085
|
var e;
|
|
2030
|
-
const
|
|
2086
|
+
const d = E("FmIcon"), c = E("FmTabs"), A = E("FmButton"), f = E("FmSideSheet");
|
|
2031
2087
|
return w(), X(f, {
|
|
2032
|
-
modelValue:
|
|
2088
|
+
modelValue: I(t),
|
|
2033
2089
|
"onUpdate:modelValue": m[2] || (m[2] = (o) => se(t) ? t.value = o : null),
|
|
2034
2090
|
header: "Data migration (Xilnex)",
|
|
2035
2091
|
"dismiss-away": "",
|
|
2036
2092
|
"close-button": "",
|
|
2037
2093
|
"max-width": 800
|
|
2038
2094
|
}, oe({
|
|
2039
|
-
default:
|
|
2040
|
-
|
|
2095
|
+
default: R(() => [
|
|
2096
|
+
I(i).isCurrentLocationBindedToNetSuite ? (w(), V(J, { key: 1 }, [
|
|
2041
2097
|
l.value === "inventoryTransfer" ? (w(), X(Cn, {
|
|
2042
2098
|
key: 0,
|
|
2043
|
-
currentLocationSetting:
|
|
2099
|
+
currentLocationSetting: h.value,
|
|
2100
|
+
nsLocations: C.value,
|
|
2101
|
+
currentLocationSubsidiary: r.value
|
|
2102
|
+
}, null, 8, ["currentLocationSetting", "nsLocations", "currentLocationSubsidiary"])) : _("", !0),
|
|
2103
|
+
l.value === "transferOrder" ? (w(), X(Vn, {
|
|
2104
|
+
key: 1,
|
|
2105
|
+
currentLocationSetting: h.value,
|
|
2044
2106
|
nsLocations: C.value,
|
|
2045
|
-
currentLocationSubsidiary:
|
|
2107
|
+
currentLocationSubsidiary: r.value
|
|
2046
2108
|
}, null, 8, ["currentLocationSetting", "nsLocations", "currentLocationSubsidiary"])) : _("", !0)
|
|
2047
|
-
], 64)) : (w(),
|
|
2109
|
+
], 64)) : (w(), V("div", On, " Netsuite is not configured for this location. Please contact your administrator. "))
|
|
2048
2110
|
]),
|
|
2049
|
-
"side-sheet-footer":
|
|
2050
|
-
a("div",
|
|
2051
|
-
|
|
2111
|
+
"side-sheet-footer": R(() => [
|
|
2112
|
+
a("div", jn, [
|
|
2113
|
+
x(A, {
|
|
2052
2114
|
variant: "tertiary",
|
|
2053
|
-
label:
|
|
2054
|
-
onClick: m[1] || (m[1] = (o) =>
|
|
2115
|
+
label: I(u)("common.close"),
|
|
2116
|
+
onClick: m[1] || (m[1] = (o) => b("update:show", !1))
|
|
2055
2117
|
}, null, 8, ["label"])
|
|
2056
2118
|
])
|
|
2057
2119
|
]),
|
|
2058
2120
|
_: 2
|
|
2059
2121
|
}, [
|
|
2060
|
-
(e =
|
|
2122
|
+
(e = I(s).sessionUser.value) != null && e.role.isAdmin ? {
|
|
2061
2123
|
name: "side-sheet-header",
|
|
2062
|
-
fn:
|
|
2124
|
+
fn: R(() => {
|
|
2063
2125
|
var o;
|
|
2064
2126
|
return [
|
|
2065
|
-
a("div",
|
|
2066
|
-
a("div",
|
|
2127
|
+
a("div", Nn, [
|
|
2128
|
+
a("div", Dn, [
|
|
2067
2129
|
m[3] || (m[3] = a("div", { class: "fm-typo-en-title-md-600" }, "NetSuite Integration", -1)),
|
|
2068
|
-
a("div",
|
|
2069
|
-
|
|
2070
|
-
name:
|
|
2130
|
+
a("div", Rn, [
|
|
2131
|
+
x(d, {
|
|
2132
|
+
name: I(y),
|
|
2071
2133
|
size: "sm"
|
|
2072
2134
|
}, null, 8, ["name"]),
|
|
2073
|
-
a("div",
|
|
2135
|
+
a("div", Mn, j((o = I(S)._currentLocation) == null ? void 0 : o.name), 1)
|
|
2074
2136
|
])
|
|
2075
2137
|
]),
|
|
2076
|
-
|
|
2138
|
+
x(c, {
|
|
2077
2139
|
"model-value": l.value,
|
|
2078
2140
|
"onUpdate:modelValue": m[0] || (m[0] = (B) => l.value = B),
|
|
2079
|
-
items:
|
|
2141
|
+
items: v
|
|
2080
2142
|
}, null, 8, ["model-value"])
|
|
2081
2143
|
])
|
|
2082
2144
|
];
|
|
@@ -2086,35 +2148,35 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2086
2148
|
]), 1032, ["modelValue"]);
|
|
2087
2149
|
};
|
|
2088
2150
|
}
|
|
2089
|
-
}),
|
|
2151
|
+
}), zn = { class: "flex justify-center" }, Hn = ["src"], _n = { class: "flex flex-col items-center gap-2" }, Xn = { class: "text-lg font-bold" }, Un = { class: "text-fm-color-neutral-gray-300" }, Qn = /* @__PURE__ */ Y({
|
|
2090
2152
|
__name: "NetSuite",
|
|
2091
2153
|
setup(F) {
|
|
2092
|
-
const
|
|
2154
|
+
const g = le(), s = te(), i = M(!1), n = M(!1);
|
|
2093
2155
|
async function t() {
|
|
2094
2156
|
n.value = !0;
|
|
2095
2157
|
}
|
|
2096
|
-
const
|
|
2158
|
+
const u = M([]);
|
|
2097
2159
|
ze(async () => {
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2160
|
+
if (g.isReady && g.isEnabled) {
|
|
2161
|
+
i.value = !0;
|
|
2100
2162
|
try {
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2163
|
+
const S = await g.getNetSuiteLocationOptions();
|
|
2164
|
+
u.value = S;
|
|
2103
2165
|
} catch {
|
|
2104
2166
|
s.open({
|
|
2105
2167
|
message: "Failed to fetch NetSuite locations",
|
|
2106
2168
|
type: "error"
|
|
2107
2169
|
});
|
|
2108
2170
|
} finally {
|
|
2109
|
-
|
|
2171
|
+
i.value = !1;
|
|
2110
2172
|
}
|
|
2111
2173
|
}
|
|
2112
2174
|
});
|
|
2113
|
-
const { t:
|
|
2114
|
-
return (
|
|
2115
|
-
const
|
|
2116
|
-
return
|
|
2117
|
-
|
|
2175
|
+
const { t: b } = G();
|
|
2176
|
+
return (S, y) => {
|
|
2177
|
+
const v = E("FmCardSection"), l = E("FmCard");
|
|
2178
|
+
return I(g).isEnabled ? (w(), V(J, { key: 0 }, [
|
|
2179
|
+
x(l, {
|
|
2118
2180
|
class: q({
|
|
2119
2181
|
"w-full": !0,
|
|
2120
2182
|
border: !0,
|
|
@@ -2122,20 +2184,20 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2122
2184
|
"cursor-pointer": !0,
|
|
2123
2185
|
"hover:border-fm-color-primary": !0
|
|
2124
2186
|
}),
|
|
2125
|
-
onClick:
|
|
2187
|
+
onClick: y[0] || (y[0] = (r) => t())
|
|
2126
2188
|
}, {
|
|
2127
|
-
default:
|
|
2128
|
-
|
|
2129
|
-
default:
|
|
2130
|
-
a("div",
|
|
2189
|
+
default: R(() => [
|
|
2190
|
+
x(v, null, {
|
|
2191
|
+
default: R(() => [
|
|
2192
|
+
a("div", zn, [
|
|
2131
2193
|
a("img", {
|
|
2132
|
-
src:
|
|
2194
|
+
src: I(Zt),
|
|
2133
2195
|
alt: "NetSuite"
|
|
2134
|
-
}, null, 8,
|
|
2196
|
+
}, null, 8, Hn)
|
|
2135
2197
|
]),
|
|
2136
|
-
a("div",
|
|
2137
|
-
a("div",
|
|
2138
|
-
a("div",
|
|
2198
|
+
a("div", _n, [
|
|
2199
|
+
a("div", Xn, j(I(b)("inventory.integration.netsuite.title")), 1),
|
|
2200
|
+
a("div", Un, j(I(b)("inventory.integration.netsuite.description")), 1)
|
|
2139
2201
|
])
|
|
2140
2202
|
]),
|
|
2141
2203
|
_: 1
|
|
@@ -2143,42 +2205,42 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2143
2205
|
]),
|
|
2144
2206
|
_: 1
|
|
2145
2207
|
}),
|
|
2146
|
-
|
|
2208
|
+
I(g).state.setting ? (w(), X(ue, {
|
|
2147
2209
|
key: 0,
|
|
2148
2210
|
to: "body"
|
|
2149
2211
|
}, [
|
|
2150
|
-
|
|
2212
|
+
I(g).isBusinessLocation ? (w(), X(dn, {
|
|
2151
2213
|
key: 0,
|
|
2152
|
-
setting:
|
|
2153
|
-
"onUpdate:setting":
|
|
2154
|
-
nsLocations:
|
|
2155
|
-
"onUpdate:nsLocations":
|
|
2214
|
+
setting: I(g).state.setting,
|
|
2215
|
+
"onUpdate:setting": y[1] || (y[1] = (r) => I(g).state.setting = r),
|
|
2216
|
+
nsLocations: u.value,
|
|
2217
|
+
"onUpdate:nsLocations": y[2] || (y[2] = (r) => u.value = r),
|
|
2156
2218
|
show: n.value,
|
|
2157
2219
|
"onUpdate:show": [
|
|
2158
|
-
|
|
2159
|
-
|
|
2220
|
+
y[3] || (y[3] = (r) => n.value = r),
|
|
2221
|
+
y[4] || (y[4] = (r) => n.value = r)
|
|
2160
2222
|
],
|
|
2161
|
-
loading:
|
|
2162
|
-
"onUpdate:loading":
|
|
2163
|
-
}, null, 8, ["setting", "nsLocations", "show", "loading"])) : (w(), X(
|
|
2223
|
+
loading: i.value,
|
|
2224
|
+
"onUpdate:loading": y[5] || (y[5] = (r) => i.value = r)
|
|
2225
|
+
}, null, 8, ["setting", "nsLocations", "show", "loading"])) : (w(), X(Tn, {
|
|
2164
2226
|
key: 1,
|
|
2165
|
-
setting:
|
|
2166
|
-
"onUpdate:setting":
|
|
2167
|
-
nsLocations:
|
|
2168
|
-
"onUpdate:nsLocations":
|
|
2227
|
+
setting: I(g).state.setting,
|
|
2228
|
+
"onUpdate:setting": y[6] || (y[6] = (r) => I(g).state.setting = r),
|
|
2229
|
+
nsLocations: u.value,
|
|
2230
|
+
"onUpdate:nsLocations": y[7] || (y[7] = (r) => u.value = r),
|
|
2169
2231
|
show: n.value,
|
|
2170
2232
|
"onUpdate:show": [
|
|
2171
|
-
|
|
2172
|
-
|
|
2233
|
+
y[8] || (y[8] = (r) => n.value = r),
|
|
2234
|
+
y[9] || (y[9] = (r) => n.value = r)
|
|
2173
2235
|
],
|
|
2174
|
-
loading:
|
|
2175
|
-
"onUpdate:loading":
|
|
2236
|
+
loading: i.value,
|
|
2237
|
+
"onUpdate:loading": y[10] || (y[10] = (r) => i.value = r)
|
|
2176
2238
|
}, null, 8, ["setting", "nsLocations", "show", "loading"]))
|
|
2177
2239
|
])) : _("", !0)
|
|
2178
2240
|
], 64)) : _("", !0);
|
|
2179
2241
|
};
|
|
2180
2242
|
}
|
|
2181
|
-
}),
|
|
2243
|
+
}), xe = [
|
|
2182
2244
|
"store",
|
|
2183
2245
|
"issueBy",
|
|
2184
2246
|
"verifiedBy",
|
|
@@ -2195,65 +2257,65 @@ const Bt = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
|
|
|
2195
2257
|
"schemeFranchiseePrice",
|
|
2196
2258
|
"physicalSchemeTotalFranchiseePrice"
|
|
2197
2259
|
];
|
|
2198
|
-
async function
|
|
2199
|
-
var
|
|
2200
|
-
const
|
|
2201
|
-
for (const
|
|
2202
|
-
const
|
|
2203
|
-
for (let
|
|
2204
|
-
const
|
|
2260
|
+
async function Yn(F, g, s) {
|
|
2261
|
+
var u;
|
|
2262
|
+
const i = await Jn(s), n = [], t = {};
|
|
2263
|
+
for (const b in i) {
|
|
2264
|
+
const S = i[b];
|
|
2265
|
+
for (let y = 0; y < S.length; y++) {
|
|
2266
|
+
const v = S[y], l = v.itemCode, r = v.itemName, h = v.physicalQty, C = v.customCost;
|
|
2205
2267
|
if (l === "" || l === "undefined") {
|
|
2206
2268
|
n.push({
|
|
2207
|
-
row:
|
|
2269
|
+
row: v.excelRow,
|
|
2208
2270
|
itemCode: l,
|
|
2209
|
-
itemName:
|
|
2271
|
+
itemName: r,
|
|
2210
2272
|
message: "Item code is empty or undefined"
|
|
2211
2273
|
});
|
|
2212
2274
|
continue;
|
|
2213
2275
|
}
|
|
2214
|
-
const
|
|
2215
|
-
if (!
|
|
2276
|
+
const k = g.find((A) => A.code === l);
|
|
2277
|
+
if (!k) {
|
|
2216
2278
|
n.push({
|
|
2217
|
-
row:
|
|
2279
|
+
row: v.excelRow,
|
|
2218
2280
|
itemCode: l,
|
|
2219
|
-
itemName:
|
|
2220
|
-
qty:
|
|
2281
|
+
itemName: r,
|
|
2282
|
+
qty: h,
|
|
2221
2283
|
message: "Item not found in inventory"
|
|
2222
|
-
}), console.error(`${
|
|
2284
|
+
}), console.error(`${v.excelRow} Item not found: ${l} ${r} ${h}`);
|
|
2223
2285
|
continue;
|
|
2224
2286
|
}
|
|
2225
|
-
let p = Number(
|
|
2226
|
-
const m = F[
|
|
2227
|
-
m && (p = m * Number(
|
|
2228
|
-
const
|
|
2229
|
-
amount:
|
|
2287
|
+
let p = Number(v.totalPhysicalCustomCost);
|
|
2288
|
+
const m = F[k._id];
|
|
2289
|
+
m && (p = m * Number(h));
|
|
2290
|
+
const d = P.fromNumber(Number(h)), c = {
|
|
2291
|
+
amount: d,
|
|
2230
2292
|
cost: {
|
|
2231
2293
|
...P.fromNumber(Number(p)),
|
|
2232
2294
|
currency: "MYR"
|
|
2233
2295
|
}
|
|
2234
2296
|
};
|
|
2235
|
-
|
|
2297
|
+
h != "0" && C == "0" && console.warn(`Item ${l} ${r} has 0 cost.`), t[u = k._id] ?? (t[u] = {
|
|
2236
2298
|
skuAdjustment: {
|
|
2237
|
-
sku:
|
|
2299
|
+
sku: k,
|
|
2238
2300
|
fromBalance: P.fromNumber(0),
|
|
2239
2301
|
amounts: [
|
|
2240
2302
|
{
|
|
2241
2303
|
_id: null,
|
|
2242
2304
|
type: we.Enum.CLOSING,
|
|
2243
2305
|
remark: "Opening Balance",
|
|
2244
|
-
amount:
|
|
2306
|
+
amount: d,
|
|
2245
2307
|
measurement: null,
|
|
2246
2308
|
// always the smallest unit
|
|
2247
|
-
cost:
|
|
2309
|
+
cost: c.cost
|
|
2248
2310
|
}
|
|
2249
2311
|
],
|
|
2250
|
-
toBalance:
|
|
2251
|
-
toCostBalances: [
|
|
2312
|
+
toBalance: d,
|
|
2313
|
+
toCostBalances: [c]
|
|
2252
2314
|
},
|
|
2253
2315
|
skuBalance: {
|
|
2254
|
-
id:
|
|
2255
|
-
balance:
|
|
2256
|
-
costs: [
|
|
2316
|
+
id: k._id,
|
|
2317
|
+
balance: d,
|
|
2318
|
+
costs: [c]
|
|
2257
2319
|
}
|
|
2258
2320
|
});
|
|
2259
2321
|
}
|
|
@@ -2263,45 +2325,45 @@ async function _n(F, v, s) {
|
|
|
2263
2325
|
rows: t
|
|
2264
2326
|
};
|
|
2265
2327
|
}
|
|
2266
|
-
async function
|
|
2267
|
-
const
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2270
|
-
}), s = ke(
|
|
2271
|
-
for (const t of
|
|
2272
|
-
const
|
|
2273
|
-
n[t] =
|
|
2328
|
+
async function Jn(F) {
|
|
2329
|
+
const g = await new Promise((t, u) => {
|
|
2330
|
+
const b = new FileReader();
|
|
2331
|
+
b.onload = (S) => t(S.target.result), b.onerror = u, b.readAsArrayBuffer(F);
|
|
2332
|
+
}), s = ke(g, { type: "array" }), i = s.SheetNames, n = {};
|
|
2333
|
+
for (const t of i) {
|
|
2334
|
+
const u = await Kn(s.Sheets[t]);
|
|
2335
|
+
n[t] = u;
|
|
2274
2336
|
}
|
|
2275
2337
|
return n;
|
|
2276
2338
|
}
|
|
2277
|
-
async function
|
|
2278
|
-
const
|
|
2279
|
-
header:
|
|
2339
|
+
async function Kn(F) {
|
|
2340
|
+
const g = Be.sheet_to_json(F, {
|
|
2341
|
+
header: xe,
|
|
2280
2342
|
range: 12
|
|
2281
2343
|
}), s = [];
|
|
2282
|
-
for (let
|
|
2283
|
-
const n =
|
|
2284
|
-
for (const
|
|
2285
|
-
t[
|
|
2344
|
+
for (let i = 0; i < g.length; i++) {
|
|
2345
|
+
const n = g[i], t = {};
|
|
2346
|
+
for (const u of xe)
|
|
2347
|
+
t[u] = String(n[u]).trim();
|
|
2286
2348
|
s.push({
|
|
2287
2349
|
...t,
|
|
2288
|
-
excelRow:
|
|
2350
|
+
excelRow: i + 13
|
|
2289
2351
|
// Excel rows start from 1, and we skip the first 12 rows
|
|
2290
2352
|
});
|
|
2291
2353
|
}
|
|
2292
2354
|
return s;
|
|
2293
2355
|
}
|
|
2294
|
-
const
|
|
2356
|
+
const Zn = { class: "flex flex-col gap-4" }, qn = { class: "flex flex-col" }, Gn = {
|
|
2295
2357
|
key: 0,
|
|
2296
2358
|
class: "flex flex-col gap-4 my-5"
|
|
2297
|
-
},
|
|
2359
|
+
}, Pn = { class: "flex flex-col gap-8" }, Wn = { class: "flex flex-col gap-8" }, $n = {
|
|
2298
2360
|
class: /* @__PURE__ */ q(["fm-corner-radius-md p-16 flex items-center gap-16"])
|
|
2299
|
-
},
|
|
2361
|
+
}, eo = {
|
|
2300
2362
|
class: /* @__PURE__ */ q(["fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center gap-3"])
|
|
2301
|
-
},
|
|
2363
|
+
}, to = { class: "line-clamp-2 text-ellipsis break-all" }, no = { class: "flex flex-col" }, oo = { class: "font-medium" }, so = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ao = { class: "flex" }, lo = { class: "flex" }, io = { key: 1 }, ro = /* @__PURE__ */ Y({
|
|
2302
2364
|
__name: "XilnexOpeningImport",
|
|
2303
2365
|
setup(F) {
|
|
2304
|
-
const
|
|
2366
|
+
const g = Ge(), s = le(), i = be(), n = Ce(), t = te(), u = z(() => [
|
|
2305
2367
|
{
|
|
2306
2368
|
value: "xilnex",
|
|
2307
2369
|
label: "Xilnex",
|
|
@@ -2316,15 +2378,15 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2316
2378
|
disabledReason: "Current location is not binded to NetSuite"
|
|
2317
2379
|
}
|
|
2318
2380
|
] : []
|
|
2319
|
-
]),
|
|
2381
|
+
]), b = M(u.value[0].value), { t: S } = de(), y = M(null), v = M(), l = M(""), r = M([]), h = M([]), C = [
|
|
2320
2382
|
{
|
|
2321
2383
|
id: "ingredient",
|
|
2322
2384
|
header: () => "Ingredient",
|
|
2323
2385
|
cell(e) {
|
|
2324
2386
|
const o = e.row.original;
|
|
2325
|
-
return
|
|
2326
|
-
|
|
2327
|
-
|
|
2387
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2388
|
+
D("span", { class: "font-medium" }, o.skuAdjustment.sku.name),
|
|
2389
|
+
D("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, [
|
|
2328
2390
|
o.skuAdjustment.sku.code
|
|
2329
2391
|
])
|
|
2330
2392
|
]);
|
|
@@ -2335,8 +2397,8 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2335
2397
|
header: () => "Opening Balance",
|
|
2336
2398
|
cell(e) {
|
|
2337
2399
|
const o = e.row.original;
|
|
2338
|
-
return
|
|
2339
|
-
|
|
2400
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2401
|
+
D(
|
|
2340
2402
|
"span",
|
|
2341
2403
|
{ class: "font-medium" },
|
|
2342
2404
|
P.toFormatString({
|
|
@@ -2353,14 +2415,14 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2353
2415
|
const o = e.row.original, B = !o.skuAdjustment.amounts[0].measurement;
|
|
2354
2416
|
let L = o.skuAdjustment.sku.unit.name;
|
|
2355
2417
|
if (!B) {
|
|
2356
|
-
const
|
|
2418
|
+
const N = o.skuAdjustment.sku.unit.measurements.find(
|
|
2357
2419
|
(H) => H.id === o.skuAdjustment.amounts[0].measurement.id
|
|
2358
2420
|
);
|
|
2359
|
-
L =
|
|
2421
|
+
L = N ? N.name : "Error: Measurement not found";
|
|
2360
2422
|
}
|
|
2361
|
-
return
|
|
2362
|
-
|
|
2363
|
-
B ? null :
|
|
2423
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2424
|
+
D("span", { class: "font-medium" }, L),
|
|
2425
|
+
B ? null : D("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, [
|
|
2364
2426
|
`Base unit: ${o.skuAdjustment.sku.unit.name}`
|
|
2365
2427
|
])
|
|
2366
2428
|
]);
|
|
@@ -2375,8 +2437,8 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2375
2437
|
precision: 0,
|
|
2376
2438
|
currency: ""
|
|
2377
2439
|
};
|
|
2378
|
-
return
|
|
2379
|
-
|
|
2440
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2441
|
+
D(
|
|
2380
2442
|
"span",
|
|
2381
2443
|
{ class: "font-medium" },
|
|
2382
2444
|
P.toFormatString({
|
|
@@ -2386,7 +2448,7 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2386
2448
|
]);
|
|
2387
2449
|
}
|
|
2388
2450
|
}
|
|
2389
|
-
],
|
|
2451
|
+
], k = [
|
|
2390
2452
|
{
|
|
2391
2453
|
accessorKey: "row",
|
|
2392
2454
|
header: "Row"
|
|
@@ -2407,19 +2469,19 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2407
2469
|
accessorKey: "message",
|
|
2408
2470
|
header: "Error Message"
|
|
2409
2471
|
}
|
|
2410
|
-
], p =
|
|
2472
|
+
], p = M(!1);
|
|
2411
2473
|
async function m() {
|
|
2412
|
-
if (
|
|
2474
|
+
if (y.value) {
|
|
2413
2475
|
p.value = !0;
|
|
2414
2476
|
try {
|
|
2415
2477
|
let e = {};
|
|
2416
|
-
|
|
2417
|
-
const { errors: o, rows: B } = await
|
|
2478
|
+
b.value === "netsuite" && (e = await s.getItemAverageCosts());
|
|
2479
|
+
const { errors: o, rows: B } = await Yn(
|
|
2418
2480
|
e,
|
|
2419
|
-
|
|
2420
|
-
|
|
2481
|
+
i.skus,
|
|
2482
|
+
y.value
|
|
2421
2483
|
);
|
|
2422
|
-
|
|
2484
|
+
r.value = o, h.value = Object.values(B);
|
|
2423
2485
|
} catch {
|
|
2424
2486
|
t.open({
|
|
2425
2487
|
message: "Error verifying file",
|
|
@@ -2430,11 +2492,11 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2430
2492
|
}
|
|
2431
2493
|
}
|
|
2432
2494
|
}
|
|
2433
|
-
async function
|
|
2434
|
-
if (
|
|
2495
|
+
async function d() {
|
|
2496
|
+
if (y.value) {
|
|
2435
2497
|
p.value = !0;
|
|
2436
2498
|
try {
|
|
2437
|
-
if (!
|
|
2499
|
+
if (!A.value) {
|
|
2438
2500
|
t.open({
|
|
2439
2501
|
message: "Please select a date for the opening balance",
|
|
2440
2502
|
type: "error"
|
|
@@ -2442,13 +2504,13 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2442
2504
|
return;
|
|
2443
2505
|
}
|
|
2444
2506
|
await n.setOpeningBalance({
|
|
2445
|
-
effectiveAt:
|
|
2446
|
-
skuAdjustments:
|
|
2447
|
-
skuBalances:
|
|
2507
|
+
effectiveAt: A.value,
|
|
2508
|
+
skuAdjustments: h.value.map((e) => e.skuAdjustment),
|
|
2509
|
+
skuBalances: h.value.map((e) => e.skuBalance)
|
|
2448
2510
|
}), t.open({
|
|
2449
2511
|
message: "Opening balance imported successfully",
|
|
2450
2512
|
type: "success"
|
|
2451
|
-
}), await
|
|
2513
|
+
}), await g.fetchClosingDocumentId();
|
|
2452
2514
|
} catch {
|
|
2453
2515
|
t.open({
|
|
2454
2516
|
message: "Error importing opening balance",
|
|
@@ -2459,73 +2521,73 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2459
2521
|
}
|
|
2460
2522
|
}
|
|
2461
2523
|
}
|
|
2462
|
-
const
|
|
2524
|
+
const c = M(""), A = z({
|
|
2463
2525
|
get() {
|
|
2464
|
-
return
|
|
2526
|
+
return c.value;
|
|
2465
2527
|
},
|
|
2466
2528
|
set(e) {
|
|
2467
|
-
|
|
2529
|
+
c.value = `${e}T15:59:59.999Z`;
|
|
2468
2530
|
}
|
|
2469
2531
|
}), f = z(() => {
|
|
2470
|
-
if (!
|
|
2471
|
-
const e = new Date(
|
|
2472
|
-
return isNaN(e.getTime()) ? null :
|
|
2532
|
+
if (!c.value) return null;
|
|
2533
|
+
const e = new Date(c.value);
|
|
2534
|
+
return isNaN(e.getTime()) ? null : ye(e);
|
|
2473
2535
|
});
|
|
2474
2536
|
return (e, o) => {
|
|
2475
|
-
const B = E("FmLabel"), L = E("FmField"),
|
|
2476
|
-
return w(),
|
|
2477
|
-
a("div",
|
|
2478
|
-
|
|
2537
|
+
const B = E("FmLabel"), L = E("FmField"), N = E("FmSimpleDatePicker"), H = E("FmButton"), U = E("FmRadio"), O = E("FmRadioGroup"), T = E("FmTable");
|
|
2538
|
+
return w(), V("div", Zn, [
|
|
2539
|
+
a("div", qn, [
|
|
2540
|
+
x(B, { label: "Latest closing" })
|
|
2479
2541
|
]),
|
|
2480
|
-
|
|
2542
|
+
x(L, {
|
|
2481
2543
|
"prepend-icon": "lock_outline",
|
|
2482
2544
|
disabled: ""
|
|
2483
2545
|
}, {
|
|
2484
|
-
default:
|
|
2485
|
-
Z(
|
|
2546
|
+
default: R(() => [
|
|
2547
|
+
Z(j(I(g).state.closingDocumentId ? `${I(Ee)(new Date(I(Ae)(I(g).state.closingDocumentId)))}` : "No closing found"), 1)
|
|
2486
2548
|
]),
|
|
2487
2549
|
_: 1
|
|
2488
2550
|
}),
|
|
2489
|
-
|
|
2551
|
+
I(g).state.closingDocumentId ? (w(), V("div", io, o[6] || (o[6] = [
|
|
2490
2552
|
a("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)
|
|
2491
|
-
]))) : (w(),
|
|
2492
|
-
|
|
2493
|
-
modelValue:
|
|
2494
|
-
"onUpdate:modelValue": o[0] || (o[0] = (Q) =>
|
|
2553
|
+
]))) : (w(), V("div", Gn, [
|
|
2554
|
+
x(N, {
|
|
2555
|
+
modelValue: A.value,
|
|
2556
|
+
"onUpdate:modelValue": o[0] || (o[0] = (Q) => A.value = Q),
|
|
2495
2557
|
label: "Last closing time"
|
|
2496
2558
|
}, {
|
|
2497
|
-
"trigger-button":
|
|
2498
|
-
|
|
2559
|
+
"trigger-button": R(() => [
|
|
2560
|
+
x(L, {
|
|
2499
2561
|
"prepend-icon": "calendar_today",
|
|
2500
2562
|
readonly: "",
|
|
2501
2563
|
label: "Last closing time"
|
|
2502
2564
|
}, {
|
|
2503
|
-
default:
|
|
2504
|
-
Z(
|
|
2565
|
+
default: R(() => [
|
|
2566
|
+
Z(j(f.value), 1)
|
|
2505
2567
|
]),
|
|
2506
2568
|
_: 1
|
|
2507
2569
|
})
|
|
2508
2570
|
]),
|
|
2509
2571
|
_: 1
|
|
2510
2572
|
}, 8, ["modelValue"]),
|
|
2511
|
-
a("div",
|
|
2512
|
-
|
|
2573
|
+
a("div", Pn, [
|
|
2574
|
+
x(B, { label: "Stock take file" })
|
|
2513
2575
|
]),
|
|
2514
|
-
|
|
2576
|
+
x(Fe, {
|
|
2515
2577
|
onFileUpload: o[1] || (o[1] = (Q) => {
|
|
2516
|
-
Q && (
|
|
2578
|
+
Q && (y.value = Q);
|
|
2517
2579
|
}),
|
|
2518
2580
|
accept: ".xlsx, .xls, .csv"
|
|
2519
2581
|
}, oe({ _: 2 }, [
|
|
2520
|
-
|
|
2582
|
+
y.value ? {
|
|
2521
2583
|
name: "default",
|
|
2522
|
-
fn:
|
|
2523
|
-
a("div",
|
|
2524
|
-
a("div",
|
|
2525
|
-
a("div",
|
|
2526
|
-
a("div",
|
|
2527
|
-
|
|
2528
|
-
label:
|
|
2584
|
+
fn: R(({ openFileDialog: Q }) => [
|
|
2585
|
+
a("div", Wn, [
|
|
2586
|
+
a("div", $n, [
|
|
2587
|
+
a("div", eo, [
|
|
2588
|
+
a("div", to, j(y.value.name), 1),
|
|
2589
|
+
x(H, {
|
|
2590
|
+
label: I(S)("inventory.ingredient.import.replaceFile"),
|
|
2529
2591
|
variant: "secondary",
|
|
2530
2592
|
"prepend-icon": "autorenew",
|
|
2531
2593
|
onClick: Q
|
|
@@ -2537,24 +2599,24 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2537
2599
|
key: "0"
|
|
2538
2600
|
} : void 0
|
|
2539
2601
|
]), 1024),
|
|
2540
|
-
|
|
2541
|
-
modelValue:
|
|
2542
|
-
"onUpdate:modelValue": o[2] || (o[2] = (Q) =>
|
|
2602
|
+
x(O, {
|
|
2603
|
+
modelValue: b.value,
|
|
2604
|
+
"onUpdate:modelValue": o[2] || (o[2] = (Q) => b.value = Q),
|
|
2543
2605
|
label: "Retrieve cost from",
|
|
2544
2606
|
class: "my-5"
|
|
2545
2607
|
}, {
|
|
2546
|
-
default:
|
|
2547
|
-
(w(!0),
|
|
2608
|
+
default: R(() => [
|
|
2609
|
+
(w(!0), V(J, null, $(u.value, (Q) => (w(), X(U, {
|
|
2548
2610
|
key: Q.value,
|
|
2549
2611
|
value: Q.value,
|
|
2550
2612
|
label: Q.label,
|
|
2551
2613
|
sublabel: Q.subLabel,
|
|
2552
2614
|
disabled: Q.disabled
|
|
2553
2615
|
}, {
|
|
2554
|
-
label:
|
|
2555
|
-
a("div",
|
|
2556
|
-
a("span",
|
|
2557
|
-
a("span",
|
|
2616
|
+
label: R(() => [
|
|
2617
|
+
a("div", no, [
|
|
2618
|
+
a("span", oo, j(Q.label), 1),
|
|
2619
|
+
a("span", so, j(Q.disabled ? Q.disabledReason : Q.subLabel), 1)
|
|
2558
2620
|
])
|
|
2559
2621
|
]),
|
|
2560
2622
|
_: 2
|
|
@@ -2562,63 +2624,63 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2562
2624
|
]),
|
|
2563
2625
|
_: 1
|
|
2564
2626
|
}, 8, ["modelValue"]),
|
|
2565
|
-
a("div",
|
|
2566
|
-
|
|
2627
|
+
a("div", ao, [
|
|
2628
|
+
x(H, {
|
|
2567
2629
|
class: "ml-auto mt-4",
|
|
2568
2630
|
variant: "secondary",
|
|
2569
2631
|
"prepend-icon": "troubleshoot",
|
|
2570
2632
|
label: "Verify",
|
|
2571
|
-
disabled: !
|
|
2633
|
+
disabled: !y.value && !p.value,
|
|
2572
2634
|
loading: p.value,
|
|
2573
2635
|
onClick: m
|
|
2574
2636
|
}, null, 8, ["disabled", "loading"])
|
|
2575
2637
|
]),
|
|
2576
|
-
|
|
2638
|
+
y.value && h.value.length > 0 ? (w(), V(J, { key: 0 }, [
|
|
2577
2639
|
o[4] || (o[4] = a("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4" }, "Results", -1)),
|
|
2578
|
-
|
|
2579
|
-
modelValue:
|
|
2580
|
-
"onUpdate:modelValue": o[3] || (o[3] = (Q) =>
|
|
2581
|
-
"row-data":
|
|
2640
|
+
x(T, {
|
|
2641
|
+
modelValue: v.value,
|
|
2642
|
+
"onUpdate:modelValue": o[3] || (o[3] = (Q) => v.value = Q),
|
|
2643
|
+
"row-data": h.value,
|
|
2582
2644
|
"column-defs": C,
|
|
2583
2645
|
"shrink-at": !1,
|
|
2584
2646
|
"search-value": l.value
|
|
2585
2647
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
2586
2648
|
], 64)) : _("", !0),
|
|
2587
|
-
|
|
2649
|
+
r.value.length > 0 ? (w(), V(J, { key: 1 }, [
|
|
2588
2650
|
o[5] || (o[5] = a("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4 text-red-600" }, "Errors", -1)),
|
|
2589
|
-
|
|
2590
|
-
"row-data":
|
|
2591
|
-
"column-defs":
|
|
2651
|
+
x(T, {
|
|
2652
|
+
"row-data": r.value,
|
|
2653
|
+
"column-defs": k
|
|
2592
2654
|
}, null, 8, ["row-data"])
|
|
2593
2655
|
], 64)) : _("", !0),
|
|
2594
|
-
a("div",
|
|
2595
|
-
|
|
2656
|
+
a("div", lo, [
|
|
2657
|
+
h.value.length > 0 && !I(g).state.closingDocumentId ? (w(), X(H, {
|
|
2596
2658
|
key: 0,
|
|
2597
2659
|
class: "ml-auto mt-4",
|
|
2598
2660
|
"prepend-icon": "file_upload",
|
|
2599
2661
|
variant: "primary",
|
|
2600
2662
|
label: "Import Opening Balance",
|
|
2601
|
-
disabled: !
|
|
2602
|
-
onClick:
|
|
2663
|
+
disabled: !y.value || p.value,
|
|
2664
|
+
onClick: d
|
|
2603
2665
|
}, null, 8, ["disabled"])) : _("", !0)
|
|
2604
2666
|
])
|
|
2605
2667
|
]))
|
|
2606
2668
|
]);
|
|
2607
2669
|
};
|
|
2608
2670
|
}
|
|
2609
|
-
}),
|
|
2671
|
+
}), uo = { class: "flex flex-col gap-8 w-full" }, co = { class: "flex gap-4 justify-between" }, mo = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400" }, fo = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, po = { key: 0 }, vo = {
|
|
2610
2672
|
key: 1,
|
|
2611
2673
|
class: "flex flex-col gap-8 w-full"
|
|
2612
|
-
},
|
|
2674
|
+
}, go = { key: 1 }, yo = { class: "flex gap-8 items-center justify-start" }, Ao = /* @__PURE__ */ Y({
|
|
2613
2675
|
__name: "XilnexSideSheet",
|
|
2614
2676
|
props: {
|
|
2615
2677
|
show: { type: Boolean },
|
|
2616
2678
|
loading: { type: Boolean }
|
|
2617
2679
|
},
|
|
2618
2680
|
emits: ["update:show"],
|
|
2619
|
-
setup(F, { emit:
|
|
2681
|
+
setup(F, { emit: g }) {
|
|
2620
2682
|
var l;
|
|
2621
|
-
const s = ie(), n = ae(F, "show"), { t } = G(),
|
|
2683
|
+
const s = ie(), n = ae(F, "show"), { t } = G(), u = g, b = W(), S = ((l = b._currentLocation) == null ? void 0 : l.type) || "", y = [
|
|
2622
2684
|
{ label: re(
|
|
2623
2685
|
"openingBalance"
|
|
2624
2686
|
/* OPENING_BALANCE */
|
|
@@ -2627,64 +2689,64 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2627
2689
|
"transferNote"
|
|
2628
2690
|
/* TRANSFER_NOTE */
|
|
2629
2691
|
) }
|
|
2630
|
-
],
|
|
2631
|
-
return (
|
|
2632
|
-
var
|
|
2633
|
-
const C = E("FmIcon"),
|
|
2692
|
+
], v = M(y[0]);
|
|
2693
|
+
return (r, h) => {
|
|
2694
|
+
var d;
|
|
2695
|
+
const C = E("FmIcon"), k = E("FmButtonGroup"), p = E("FmButton"), m = E("FmSideSheet");
|
|
2634
2696
|
return w(), X(m, {
|
|
2635
|
-
modelValue:
|
|
2636
|
-
"onUpdate:modelValue":
|
|
2697
|
+
modelValue: I(n),
|
|
2698
|
+
"onUpdate:modelValue": h[2] || (h[2] = (c) => se(n) ? n.value = c : null),
|
|
2637
2699
|
header: "Data migration (Xilnex)",
|
|
2638
2700
|
"dismiss-away": "",
|
|
2639
2701
|
"close-button": "",
|
|
2640
2702
|
"max-width": 800
|
|
2641
2703
|
}, oe({
|
|
2642
|
-
default:
|
|
2643
|
-
var
|
|
2704
|
+
default: R(() => {
|
|
2705
|
+
var c;
|
|
2644
2706
|
return [
|
|
2645
|
-
(
|
|
2646
|
-
|
|
2707
|
+
(c = I(s).sessionUser.value) != null && c.role.isAdmin ? (w(), V("div", vo, [
|
|
2708
|
+
v.value.label === I(re)(
|
|
2647
2709
|
"openingBalance"
|
|
2648
2710
|
/* OPENING_BALANCE */
|
|
2649
|
-
) ? (w(), X(
|
|
2650
|
-
|
|
2711
|
+
) ? (w(), X(ro, { key: 0 })) : _("", !0),
|
|
2712
|
+
v.value.label === I(re)(
|
|
2651
2713
|
"transferNote"
|
|
2652
2714
|
/* TRANSFER_NOTE */
|
|
2653
|
-
) ? (w(),
|
|
2654
|
-
])) : (w(),
|
|
2715
|
+
) ? (w(), V("div", go, " Not available yet. ")) : _("", !0)
|
|
2716
|
+
])) : (w(), V("div", po, " Please contact your administrator to apply the changes. "))
|
|
2655
2717
|
];
|
|
2656
2718
|
}),
|
|
2657
|
-
"side-sheet-footer":
|
|
2658
|
-
a("div",
|
|
2659
|
-
|
|
2719
|
+
"side-sheet-footer": R(() => [
|
|
2720
|
+
a("div", yo, [
|
|
2721
|
+
x(p, {
|
|
2660
2722
|
variant: "tertiary",
|
|
2661
|
-
label:
|
|
2662
|
-
onClick:
|
|
2723
|
+
label: I(t)("common.close"),
|
|
2724
|
+
onClick: h[1] || (h[1] = (c) => u("update:show", !1))
|
|
2663
2725
|
}, null, 8, ["label"])
|
|
2664
2726
|
])
|
|
2665
2727
|
]),
|
|
2666
2728
|
_: 2
|
|
2667
2729
|
}, [
|
|
2668
|
-
(
|
|
2730
|
+
(d = I(s).sessionUser.value) != null && d.role.isAdmin ? {
|
|
2669
2731
|
name: "side-sheet-header",
|
|
2670
|
-
fn:
|
|
2671
|
-
var
|
|
2732
|
+
fn: R(() => {
|
|
2733
|
+
var c;
|
|
2672
2734
|
return [
|
|
2673
|
-
a("div",
|
|
2674
|
-
a("div",
|
|
2675
|
-
|
|
2676
|
-
a("div",
|
|
2677
|
-
|
|
2678
|
-
name:
|
|
2735
|
+
a("div", uo, [
|
|
2736
|
+
a("div", co, [
|
|
2737
|
+
h[3] || (h[3] = a("div", { class: "fm-typo-en-title-md-600" }, "Data migration (Xilnex)", -1)),
|
|
2738
|
+
a("div", mo, [
|
|
2739
|
+
x(C, {
|
|
2740
|
+
name: I(S),
|
|
2679
2741
|
size: "sm"
|
|
2680
2742
|
}, null, 8, ["name"]),
|
|
2681
|
-
a("div",
|
|
2743
|
+
a("div", fo, j((c = I(b)._currentLocation) == null ? void 0 : c.name), 1)
|
|
2682
2744
|
])
|
|
2683
2745
|
]),
|
|
2684
|
-
|
|
2685
|
-
modelValue:
|
|
2686
|
-
"onUpdate:modelValue":
|
|
2687
|
-
items:
|
|
2746
|
+
x(k, {
|
|
2747
|
+
modelValue: v.value,
|
|
2748
|
+
"onUpdate:modelValue": h[0] || (h[0] = (A) => v.value = A),
|
|
2749
|
+
items: y
|
|
2688
2750
|
}, null, 8, ["modelValue"])
|
|
2689
2751
|
])
|
|
2690
2752
|
];
|
|
@@ -2694,17 +2756,17 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2694
2756
|
]), 1032, ["modelValue"]);
|
|
2695
2757
|
};
|
|
2696
2758
|
}
|
|
2697
|
-
}),
|
|
2759
|
+
}), bo = /* @__PURE__ */ Y({
|
|
2698
2760
|
__name: "XilnexView",
|
|
2699
2761
|
setup(F) {
|
|
2700
|
-
const
|
|
2762
|
+
const g = Le(), s = W(), i = M(!1);
|
|
2701
2763
|
async function n() {
|
|
2702
|
-
|
|
2764
|
+
i.value = !0, console.log("Opening Xilnex migration dialog");
|
|
2703
2765
|
}
|
|
2704
|
-
return (t,
|
|
2705
|
-
const
|
|
2706
|
-
return
|
|
2707
|
-
|
|
2766
|
+
return (t, u) => {
|
|
2767
|
+
const b = E("FmCardSection"), S = E("FmCard");
|
|
2768
|
+
return I(g).enabledXilnexOpeningMigration && !I(s).businessLevel ? (w(), V(J, { key: 0 }, [
|
|
2769
|
+
x(S, {
|
|
2708
2770
|
class: q({
|
|
2709
2771
|
"w-full": !0,
|
|
2710
2772
|
border: !0,
|
|
@@ -2712,11 +2774,11 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2712
2774
|
"cursor-pointer": !0,
|
|
2713
2775
|
"hover:border-fm-color-primary": !0
|
|
2714
2776
|
}),
|
|
2715
|
-
onClick:
|
|
2777
|
+
onClick: u[0] || (u[0] = (y) => n())
|
|
2716
2778
|
}, {
|
|
2717
|
-
default:
|
|
2718
|
-
|
|
2719
|
-
default:
|
|
2779
|
+
default: R(() => [
|
|
2780
|
+
x(b, null, {
|
|
2781
|
+
default: R(() => u[2] || (u[2] = [
|
|
2720
2782
|
a("div", { class: "flex justify-center" }, [
|
|
2721
2783
|
a("div", { class: "size-[100px] bg-gray-200 rounded-lg flex items-center justify-center" }, [
|
|
2722
2784
|
a("span", { class: "text-lg font-bold text-gray-600" }, "Xilnex")
|
|
@@ -2733,9 +2795,9 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2733
2795
|
_: 1
|
|
2734
2796
|
}),
|
|
2735
2797
|
(w(), X(ue, { to: "body" }, [
|
|
2736
|
-
|
|
2737
|
-
show:
|
|
2738
|
-
"onUpdate:show":
|
|
2798
|
+
x(Ao, {
|
|
2799
|
+
show: i.value,
|
|
2800
|
+
"onUpdate:show": u[1] || (u[1] = (y) => i.value = y)
|
|
2739
2801
|
}, null, 8, ["show"])
|
|
2740
2802
|
]))
|
|
2741
2803
|
], 64)) : _("", !0);
|
|
@@ -2751,63 +2813,63 @@ const Qn = { class: "flex flex-col gap-4" }, Yn = { class: "flex flex-col" }, Jn
|
|
|
2751
2813
|
"quantity",
|
|
2752
2814
|
"total"
|
|
2753
2815
|
];
|
|
2754
|
-
async function
|
|
2755
|
-
var
|
|
2756
|
-
const
|
|
2757
|
-
for (let
|
|
2758
|
-
const
|
|
2816
|
+
async function ho(F, g, s) {
|
|
2817
|
+
var S;
|
|
2818
|
+
const i = await xo(s), n = [], t = {}, u = Object.keys(i)[0], b = i[u];
|
|
2819
|
+
for (let y = 0; y < b.length; y++) {
|
|
2820
|
+
const v = b[y], l = v.code, r = v.description, h = v.quantity, C = v.unitcost;
|
|
2759
2821
|
if (l === "" || l === "undefined") {
|
|
2760
2822
|
n.push({
|
|
2761
|
-
row:
|
|
2823
|
+
row: v.excelRow,
|
|
2762
2824
|
itemCode: l,
|
|
2763
|
-
itemName:
|
|
2825
|
+
itemName: r,
|
|
2764
2826
|
message: "Item code is empty or undefined"
|
|
2765
2827
|
});
|
|
2766
2828
|
continue;
|
|
2767
2829
|
}
|
|
2768
|
-
const
|
|
2769
|
-
if (!
|
|
2830
|
+
const k = g.find((A) => A.code === l);
|
|
2831
|
+
if (!k) {
|
|
2770
2832
|
n.push({
|
|
2771
|
-
row:
|
|
2833
|
+
row: v.excelRow,
|
|
2772
2834
|
itemCode: l,
|
|
2773
|
-
itemName:
|
|
2774
|
-
qty:
|
|
2835
|
+
itemName: r,
|
|
2836
|
+
qty: h,
|
|
2775
2837
|
message: "Item not found in inventory"
|
|
2776
|
-
}), console.error(`${
|
|
2838
|
+
}), console.error(`${v.excelRow} Item not found: ${l} ${r} ${h}`);
|
|
2777
2839
|
continue;
|
|
2778
2840
|
}
|
|
2779
|
-
let p = Number(
|
|
2780
|
-
const m = F[
|
|
2781
|
-
m && (p = m * Number(
|
|
2782
|
-
const
|
|
2783
|
-
amount:
|
|
2841
|
+
let p = Number(v.total);
|
|
2842
|
+
const m = F[k._id];
|
|
2843
|
+
m && (p = m * Number(h));
|
|
2844
|
+
const d = P.fromNumber(Number(h)), c = {
|
|
2845
|
+
amount: d,
|
|
2784
2846
|
cost: {
|
|
2785
2847
|
...P.fromNumber(Number(p)),
|
|
2786
2848
|
currency: "MYR"
|
|
2787
2849
|
}
|
|
2788
2850
|
};
|
|
2789
|
-
|
|
2851
|
+
h != "0" && C == "0" && console.warn(`Item ${l} ${r} has 0 cost.`), t[S = k._id] ?? (t[S] = {
|
|
2790
2852
|
skuAdjustment: {
|
|
2791
|
-
sku:
|
|
2853
|
+
sku: k,
|
|
2792
2854
|
fromBalance: P.fromNumber(0),
|
|
2793
2855
|
amounts: [
|
|
2794
2856
|
{
|
|
2795
2857
|
_id: null,
|
|
2796
2858
|
type: we.Enum.CLOSING,
|
|
2797
2859
|
remark: "Opening Balance",
|
|
2798
|
-
amount:
|
|
2860
|
+
amount: d,
|
|
2799
2861
|
measurement: null,
|
|
2800
2862
|
// always the smallest unit
|
|
2801
|
-
cost:
|
|
2863
|
+
cost: c.cost
|
|
2802
2864
|
}
|
|
2803
2865
|
],
|
|
2804
|
-
toBalance:
|
|
2805
|
-
toCostBalances: [
|
|
2866
|
+
toBalance: d,
|
|
2867
|
+
toCostBalances: [c]
|
|
2806
2868
|
},
|
|
2807
2869
|
skuBalance: {
|
|
2808
|
-
id:
|
|
2809
|
-
balance:
|
|
2810
|
-
costs: [
|
|
2870
|
+
id: k._id,
|
|
2871
|
+
balance: d,
|
|
2872
|
+
costs: [c]
|
|
2811
2873
|
}
|
|
2812
2874
|
});
|
|
2813
2875
|
}
|
|
@@ -2816,59 +2878,59 @@ async function go(F, v, s) {
|
|
|
2816
2878
|
rows: t
|
|
2817
2879
|
};
|
|
2818
2880
|
}
|
|
2819
|
-
async function
|
|
2820
|
-
const
|
|
2821
|
-
const
|
|
2822
|
-
|
|
2823
|
-
}), s = ke(
|
|
2824
|
-
for (const t of
|
|
2825
|
-
const
|
|
2826
|
-
n[t] =
|
|
2881
|
+
async function xo(F) {
|
|
2882
|
+
const g = await new Promise((t, u) => {
|
|
2883
|
+
const b = new FileReader();
|
|
2884
|
+
b.onload = (S) => t(S.target.result), b.onerror = u, b.readAsArrayBuffer(F);
|
|
2885
|
+
}), s = ke(g, { type: "array" }), i = s.SheetNames, n = {};
|
|
2886
|
+
for (const t of i) {
|
|
2887
|
+
const u = await Io(s.Sheets[t]);
|
|
2888
|
+
n[t] = u;
|
|
2827
2889
|
}
|
|
2828
2890
|
return n;
|
|
2829
2891
|
}
|
|
2830
|
-
async function
|
|
2831
|
-
const
|
|
2892
|
+
async function Io(F) {
|
|
2893
|
+
const g = Be.sheet_to_json(F, {
|
|
2832
2894
|
header: Ie,
|
|
2833
2895
|
range: 1
|
|
2834
2896
|
}), s = [];
|
|
2835
|
-
for (let
|
|
2836
|
-
const n =
|
|
2837
|
-
for (const
|
|
2838
|
-
t[
|
|
2897
|
+
for (let i = 0; i < g.length; i++) {
|
|
2898
|
+
const n = g[i], t = {};
|
|
2899
|
+
for (const u of Ie)
|
|
2900
|
+
t[u] = String(n[u]).trim();
|
|
2839
2901
|
s.push({
|
|
2840
2902
|
...t,
|
|
2841
|
-
excelRow:
|
|
2903
|
+
excelRow: i + 2
|
|
2842
2904
|
// Excel rows start from 1, and we skip the first row
|
|
2843
2905
|
});
|
|
2844
2906
|
}
|
|
2845
2907
|
return s;
|
|
2846
2908
|
}
|
|
2847
|
-
const
|
|
2909
|
+
const So = { class: "flex flex-col gap-4" }, wo = { class: "flex flex-col" }, ko = {
|
|
2848
2910
|
key: 0,
|
|
2849
2911
|
class: "flex flex-col gap-4 my-5"
|
|
2850
|
-
},
|
|
2912
|
+
}, Bo = { class: "flex flex-col gap-8" }, Co = { class: "flex flex-col gap-8" }, Eo = {
|
|
2851
2913
|
class: /* @__PURE__ */ q(["fm-corner-radius-md p-16 flex items-center gap-16"])
|
|
2852
|
-
},
|
|
2914
|
+
}, Fo = {
|
|
2853
2915
|
class: /* @__PURE__ */ q(["fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center gap-3"])
|
|
2854
|
-
},
|
|
2916
|
+
}, Lo = { class: "line-clamp-2 text-ellipsis break-all" }, Vo = { class: "flex flex-col" }, No = { class: "font-medium" }, Do = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Ro = { class: "flex" }, Mo = { class: "flex" }, Oo = { key: 1 }, jo = /* @__PURE__ */ Y({
|
|
2855
2917
|
__name: "SynergyOpeningImport",
|
|
2856
2918
|
setup(F) {
|
|
2857
|
-
const
|
|
2919
|
+
const g = Pe(), s = be(), i = Ce(), n = te(), t = z(() => [
|
|
2858
2920
|
{
|
|
2859
2921
|
value: "synergy",
|
|
2860
2922
|
label: "Synergy",
|
|
2861
2923
|
subLabel: "Based on Synergy's item cost from excel file"
|
|
2862
2924
|
}
|
|
2863
|
-
]),
|
|
2925
|
+
]), u = M(t.value[0].value), { t: b } = de(), S = M(null), y = M(), v = M(""), l = M([]), r = M([]), h = [
|
|
2864
2926
|
{
|
|
2865
2927
|
id: "ingredient",
|
|
2866
2928
|
header: () => "Ingredient",
|
|
2867
2929
|
cell(f) {
|
|
2868
2930
|
const e = f.row.original;
|
|
2869
|
-
return
|
|
2870
|
-
|
|
2871
|
-
|
|
2931
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2932
|
+
D("span", { class: "font-medium" }, e.skuAdjustment.sku.name),
|
|
2933
|
+
D("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, [
|
|
2872
2934
|
e.skuAdjustment.sku.code
|
|
2873
2935
|
])
|
|
2874
2936
|
]);
|
|
@@ -2879,8 +2941,8 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
2879
2941
|
header: () => "Opening Balance",
|
|
2880
2942
|
cell(f) {
|
|
2881
2943
|
const e = f.row.original;
|
|
2882
|
-
return
|
|
2883
|
-
|
|
2944
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2945
|
+
D(
|
|
2884
2946
|
"span",
|
|
2885
2947
|
{ class: "font-medium" },
|
|
2886
2948
|
P.toFormatString({
|
|
@@ -2898,13 +2960,13 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
2898
2960
|
let B = e.skuAdjustment.sku.unit.name;
|
|
2899
2961
|
if (!o) {
|
|
2900
2962
|
const L = e.skuAdjustment.sku.unit.measurements.find(
|
|
2901
|
-
(
|
|
2963
|
+
(N) => N.id === e.skuAdjustment.amounts[0].measurement.id
|
|
2902
2964
|
);
|
|
2903
2965
|
B = L ? L.name : "Error: Measurement not found";
|
|
2904
2966
|
}
|
|
2905
|
-
return
|
|
2906
|
-
|
|
2907
|
-
o ? null :
|
|
2967
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2968
|
+
D("span", { class: "font-medium" }, B),
|
|
2969
|
+
o ? null : D("span", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, [
|
|
2908
2970
|
`Base unit: ${e.skuAdjustment.sku.unit.name}`
|
|
2909
2971
|
])
|
|
2910
2972
|
]);
|
|
@@ -2919,8 +2981,8 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
2919
2981
|
precision: 0,
|
|
2920
2982
|
currency: ""
|
|
2921
2983
|
};
|
|
2922
|
-
return
|
|
2923
|
-
|
|
2984
|
+
return D("div", { class: "flex flex-col" }, [
|
|
2985
|
+
D(
|
|
2924
2986
|
"span",
|
|
2925
2987
|
{ class: "font-medium" },
|
|
2926
2988
|
P.toFormatString({
|
|
@@ -2951,127 +3013,127 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
2951
3013
|
accessorKey: "message",
|
|
2952
3014
|
header: "Error Message"
|
|
2953
3015
|
}
|
|
2954
|
-
],
|
|
3016
|
+
], k = M(!1);
|
|
2955
3017
|
async function p() {
|
|
2956
|
-
if (
|
|
2957
|
-
|
|
3018
|
+
if (S.value) {
|
|
3019
|
+
k.value = !0;
|
|
2958
3020
|
try {
|
|
2959
3021
|
let f = {};
|
|
2960
|
-
const { errors: e, rows: o } = await
|
|
3022
|
+
const { errors: e, rows: o } = await ho(
|
|
2961
3023
|
f,
|
|
2962
3024
|
s.skus,
|
|
2963
|
-
|
|
3025
|
+
S.value
|
|
2964
3026
|
);
|
|
2965
|
-
l.value = e,
|
|
3027
|
+
l.value = e, r.value = Object.values(o);
|
|
2966
3028
|
} catch {
|
|
2967
3029
|
n.open({
|
|
2968
3030
|
message: "Error verifying file",
|
|
2969
3031
|
type: "error"
|
|
2970
3032
|
});
|
|
2971
3033
|
} finally {
|
|
2972
|
-
|
|
3034
|
+
k.value = !1;
|
|
2973
3035
|
}
|
|
2974
3036
|
}
|
|
2975
3037
|
}
|
|
2976
3038
|
async function m() {
|
|
2977
|
-
if (
|
|
2978
|
-
|
|
3039
|
+
if (S.value) {
|
|
3040
|
+
k.value = !0;
|
|
2979
3041
|
try {
|
|
2980
|
-
if (!
|
|
3042
|
+
if (!c.value) {
|
|
2981
3043
|
n.open({
|
|
2982
3044
|
message: "Please select a date for the opening balance",
|
|
2983
3045
|
type: "error"
|
|
2984
3046
|
});
|
|
2985
3047
|
return;
|
|
2986
3048
|
}
|
|
2987
|
-
await
|
|
2988
|
-
effectiveAt:
|
|
2989
|
-
skuAdjustments:
|
|
2990
|
-
skuBalances:
|
|
3049
|
+
await i.setOpeningBalance({
|
|
3050
|
+
effectiveAt: c.value,
|
|
3051
|
+
skuAdjustments: r.value.map((f) => f.skuAdjustment),
|
|
3052
|
+
skuBalances: r.value.map((f) => f.skuBalance)
|
|
2991
3053
|
}), n.open({
|
|
2992
3054
|
message: "Opening balance imported successfully",
|
|
2993
3055
|
type: "success"
|
|
2994
|
-
}), await
|
|
3056
|
+
}), await g.fetchClosingDocumentId();
|
|
2995
3057
|
} catch {
|
|
2996
3058
|
n.open({
|
|
2997
3059
|
message: "Error importing opening balance",
|
|
2998
3060
|
type: "error"
|
|
2999
3061
|
});
|
|
3000
3062
|
} finally {
|
|
3001
|
-
|
|
3063
|
+
k.value = !1;
|
|
3002
3064
|
}
|
|
3003
3065
|
}
|
|
3004
3066
|
}
|
|
3005
|
-
const
|
|
3067
|
+
const d = M(""), c = z({
|
|
3006
3068
|
get() {
|
|
3007
|
-
return
|
|
3069
|
+
return d.value;
|
|
3008
3070
|
},
|
|
3009
3071
|
set(f) {
|
|
3010
|
-
|
|
3072
|
+
d.value = `${f}T15:59:59.999Z`;
|
|
3011
3073
|
}
|
|
3012
|
-
}),
|
|
3013
|
-
if (!
|
|
3014
|
-
const f = new Date(
|
|
3015
|
-
return isNaN(f.getTime()) ? null :
|
|
3074
|
+
}), A = z(() => {
|
|
3075
|
+
if (!d.value) return null;
|
|
3076
|
+
const f = new Date(d.value);
|
|
3077
|
+
return isNaN(f.getTime()) ? null : ye(f);
|
|
3016
3078
|
});
|
|
3017
3079
|
return (f, e) => {
|
|
3018
|
-
const o = E("FmLabel"), B = E("FmField"), L = E("FmSimpleDatePicker"),
|
|
3019
|
-
return w(),
|
|
3020
|
-
a("div",
|
|
3021
|
-
|
|
3080
|
+
const o = E("FmLabel"), B = E("FmField"), L = E("FmSimpleDatePicker"), N = E("FmButton"), H = E("FmRadio"), U = E("FmRadioGroup"), O = E("FmTable");
|
|
3081
|
+
return w(), V("div", So, [
|
|
3082
|
+
a("div", wo, [
|
|
3083
|
+
x(o, { label: "Latest closing" })
|
|
3022
3084
|
]),
|
|
3023
|
-
|
|
3085
|
+
x(B, {
|
|
3024
3086
|
"prepend-icon": "lock_outline",
|
|
3025
3087
|
disabled: ""
|
|
3026
3088
|
}, {
|
|
3027
|
-
default:
|
|
3028
|
-
Z(
|
|
3089
|
+
default: R(() => [
|
|
3090
|
+
Z(j(I(g).state.closingDocumentId ? `${I(Ee)(new Date(I(Ae)(I(g).state.closingDocumentId)))}` : "No closing found"), 1)
|
|
3029
3091
|
]),
|
|
3030
3092
|
_: 1
|
|
3031
3093
|
}),
|
|
3032
|
-
|
|
3094
|
+
I(g).state.closingDocumentId ? (w(), V("div", Oo, e[6] || (e[6] = [
|
|
3033
3095
|
a("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)
|
|
3034
|
-
]))) : (w(),
|
|
3035
|
-
|
|
3036
|
-
modelValue:
|
|
3037
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
3096
|
+
]))) : (w(), V("div", ko, [
|
|
3097
|
+
x(L, {
|
|
3098
|
+
modelValue: c.value,
|
|
3099
|
+
"onUpdate:modelValue": e[0] || (e[0] = (T) => c.value = T),
|
|
3038
3100
|
label: "Last closing time"
|
|
3039
3101
|
}, {
|
|
3040
|
-
"trigger-button":
|
|
3041
|
-
|
|
3102
|
+
"trigger-button": R(() => [
|
|
3103
|
+
x(B, {
|
|
3042
3104
|
"prepend-icon": "calendar_today",
|
|
3043
3105
|
readonly: "",
|
|
3044
3106
|
label: "Last closing time"
|
|
3045
3107
|
}, {
|
|
3046
|
-
default:
|
|
3047
|
-
Z(
|
|
3108
|
+
default: R(() => [
|
|
3109
|
+
Z(j(A.value), 1)
|
|
3048
3110
|
]),
|
|
3049
3111
|
_: 1
|
|
3050
3112
|
})
|
|
3051
3113
|
]),
|
|
3052
3114
|
_: 1
|
|
3053
3115
|
}, 8, ["modelValue"]),
|
|
3054
|
-
a("div",
|
|
3055
|
-
|
|
3116
|
+
a("div", Bo, [
|
|
3117
|
+
x(o, { label: "Stock take file" })
|
|
3056
3118
|
]),
|
|
3057
|
-
|
|
3058
|
-
onFileUpload: e[1] || (e[1] = (
|
|
3059
|
-
|
|
3119
|
+
x(Fe, {
|
|
3120
|
+
onFileUpload: e[1] || (e[1] = (T) => {
|
|
3121
|
+
T && (S.value = T);
|
|
3060
3122
|
}),
|
|
3061
3123
|
accept: ".xlsx, .xls, .csv"
|
|
3062
3124
|
}, oe({ _: 2 }, [
|
|
3063
|
-
|
|
3125
|
+
S.value ? {
|
|
3064
3126
|
name: "default",
|
|
3065
|
-
fn:
|
|
3066
|
-
a("div",
|
|
3067
|
-
a("div",
|
|
3068
|
-
a("div",
|
|
3069
|
-
a("div",
|
|
3070
|
-
|
|
3071
|
-
label:
|
|
3127
|
+
fn: R(({ openFileDialog: T }) => [
|
|
3128
|
+
a("div", Co, [
|
|
3129
|
+
a("div", Eo, [
|
|
3130
|
+
a("div", Fo, [
|
|
3131
|
+
a("div", Lo, j(S.value.name), 1),
|
|
3132
|
+
x(N, {
|
|
3133
|
+
label: I(b)("inventory.ingredient.import.replaceFile"),
|
|
3072
3134
|
variant: "secondary",
|
|
3073
3135
|
"prepend-icon": "autorenew",
|
|
3074
|
-
onClick:
|
|
3136
|
+
onClick: T
|
|
3075
3137
|
}, null, 8, ["label", "onClick"])
|
|
3076
3138
|
])
|
|
3077
3139
|
])
|
|
@@ -3080,24 +3142,24 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3080
3142
|
key: "0"
|
|
3081
3143
|
} : void 0
|
|
3082
3144
|
]), 1024),
|
|
3083
|
-
|
|
3084
|
-
modelValue:
|
|
3085
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
3145
|
+
x(U, {
|
|
3146
|
+
modelValue: u.value,
|
|
3147
|
+
"onUpdate:modelValue": e[2] || (e[2] = (T) => u.value = T),
|
|
3086
3148
|
label: "Retrieve cost from",
|
|
3087
3149
|
class: "my-5"
|
|
3088
3150
|
}, {
|
|
3089
|
-
default:
|
|
3090
|
-
(w(!0),
|
|
3091
|
-
key:
|
|
3092
|
-
value:
|
|
3093
|
-
label:
|
|
3094
|
-
sublabel:
|
|
3095
|
-
disabled:
|
|
3151
|
+
default: R(() => [
|
|
3152
|
+
(w(!0), V(J, null, $(t.value, (T) => (w(), X(H, {
|
|
3153
|
+
key: T.value,
|
|
3154
|
+
value: T.value,
|
|
3155
|
+
label: T.label,
|
|
3156
|
+
sublabel: T.subLabel,
|
|
3157
|
+
disabled: T.disabled
|
|
3096
3158
|
}, {
|
|
3097
|
-
label:
|
|
3098
|
-
a("div",
|
|
3099
|
-
a("span",
|
|
3100
|
-
a("span",
|
|
3159
|
+
label: R(() => [
|
|
3160
|
+
a("div", Vo, [
|
|
3161
|
+
a("span", No, j(T.label), 1),
|
|
3162
|
+
a("span", Do, j(T.disabled ? T.disabledReason : T.subLabel), 1)
|
|
3101
3163
|
])
|
|
3102
3164
|
]),
|
|
3103
3165
|
_: 2
|
|
@@ -3105,43 +3167,43 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3105
3167
|
]),
|
|
3106
3168
|
_: 1
|
|
3107
3169
|
}, 8, ["modelValue"]),
|
|
3108
|
-
a("div",
|
|
3109
|
-
|
|
3170
|
+
a("div", Ro, [
|
|
3171
|
+
x(N, {
|
|
3110
3172
|
class: "ml-auto mt-4",
|
|
3111
3173
|
variant: "secondary",
|
|
3112
3174
|
"prepend-icon": "troubleshoot",
|
|
3113
3175
|
label: "Verify",
|
|
3114
|
-
disabled: !
|
|
3115
|
-
loading:
|
|
3176
|
+
disabled: !S.value && !k.value,
|
|
3177
|
+
loading: k.value,
|
|
3116
3178
|
onClick: p
|
|
3117
3179
|
}, null, 8, ["disabled", "loading"])
|
|
3118
3180
|
]),
|
|
3119
|
-
|
|
3181
|
+
S.value && r.value.length > 0 ? (w(), V(J, { key: 0 }, [
|
|
3120
3182
|
e[4] || (e[4] = a("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4" }, "Results", -1)),
|
|
3121
|
-
|
|
3122
|
-
modelValue:
|
|
3123
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
3124
|
-
"row-data":
|
|
3125
|
-
"column-defs":
|
|
3183
|
+
x(O, {
|
|
3184
|
+
modelValue: y.value,
|
|
3185
|
+
"onUpdate:modelValue": e[3] || (e[3] = (T) => y.value = T),
|
|
3186
|
+
"row-data": r.value,
|
|
3187
|
+
"column-defs": h,
|
|
3126
3188
|
"shrink-at": !1,
|
|
3127
|
-
"search-value":
|
|
3189
|
+
"search-value": v.value
|
|
3128
3190
|
}, null, 8, ["modelValue", "row-data", "search-value"])
|
|
3129
3191
|
], 64)) : _("", !0),
|
|
3130
|
-
l.value.length > 0 ? (w(),
|
|
3192
|
+
l.value.length > 0 ? (w(), V(J, { key: 1 }, [
|
|
3131
3193
|
e[5] || (e[5] = a("h2", { class: "fm-typo-en-title-md-800 mt-8 mb-4 text-red-600" }, "Errors", -1)),
|
|
3132
|
-
|
|
3194
|
+
x(O, {
|
|
3133
3195
|
"row-data": l.value,
|
|
3134
3196
|
"column-defs": C
|
|
3135
3197
|
}, null, 8, ["row-data"])
|
|
3136
3198
|
], 64)) : _("", !0),
|
|
3137
|
-
a("div",
|
|
3138
|
-
|
|
3199
|
+
a("div", Mo, [
|
|
3200
|
+
r.value.length > 0 && !I(g).state.closingDocumentId ? (w(), X(N, {
|
|
3139
3201
|
key: 0,
|
|
3140
3202
|
class: "ml-auto mt-4",
|
|
3141
3203
|
"prepend-icon": "file_upload",
|
|
3142
3204
|
variant: "primary",
|
|
3143
3205
|
label: "Import Opening Balance",
|
|
3144
|
-
disabled: !
|
|
3206
|
+
disabled: !S.value || k.value,
|
|
3145
3207
|
onClick: m
|
|
3146
3208
|
}, null, 8, ["disabled"])) : _("", !0)
|
|
3147
3209
|
])
|
|
@@ -3149,63 +3211,63 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3149
3211
|
]);
|
|
3150
3212
|
};
|
|
3151
3213
|
}
|
|
3152
|
-
}),
|
|
3214
|
+
}), To = { class: "flex flex-col gap-8 w-full" }, zo = { class: "flex gap-4 justify-between" }, Ho = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400" }, _o = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, Xo = { key: 0 }, Uo = {
|
|
3153
3215
|
key: 1,
|
|
3154
3216
|
class: "flex flex-col gap-8 w-full"
|
|
3155
|
-
},
|
|
3217
|
+
}, Qo = { class: "flex gap-8 items-center justify-start" }, Yo = /* @__PURE__ */ Y({
|
|
3156
3218
|
__name: "SynergySideSheet",
|
|
3157
3219
|
props: {
|
|
3158
3220
|
show: { type: Boolean },
|
|
3159
3221
|
loading: { type: Boolean }
|
|
3160
3222
|
},
|
|
3161
3223
|
emits: ["update:show"],
|
|
3162
|
-
setup(F, { emit:
|
|
3163
|
-
var
|
|
3164
|
-
const s = ie(), n = ae(F, "show"), { t } = G(),
|
|
3165
|
-
return (
|
|
3166
|
-
var
|
|
3167
|
-
const
|
|
3224
|
+
setup(F, { emit: g }) {
|
|
3225
|
+
var y;
|
|
3226
|
+
const s = ie(), n = ae(F, "show"), { t } = G(), u = g, b = W(), S = ((y = b._currentLocation) == null ? void 0 : y.type) || "";
|
|
3227
|
+
return (v, l) => {
|
|
3228
|
+
var k;
|
|
3229
|
+
const r = E("FmIcon"), h = E("FmButton"), C = E("FmSideSheet");
|
|
3168
3230
|
return w(), X(C, {
|
|
3169
|
-
modelValue:
|
|
3231
|
+
modelValue: I(n),
|
|
3170
3232
|
"onUpdate:modelValue": l[1] || (l[1] = (p) => se(n) ? n.value = p : null),
|
|
3171
3233
|
header: "Data migration (Synergy)",
|
|
3172
3234
|
"dismiss-away": "",
|
|
3173
3235
|
"close-button": "",
|
|
3174
3236
|
"max-width": 800
|
|
3175
3237
|
}, oe({
|
|
3176
|
-
default:
|
|
3238
|
+
default: R(() => {
|
|
3177
3239
|
var p;
|
|
3178
3240
|
return [
|
|
3179
|
-
(p =
|
|
3180
|
-
|
|
3181
|
-
])) : (w(),
|
|
3241
|
+
(p = I(s).sessionUser.value) != null && p.role.isAdmin ? (w(), V("div", Uo, [
|
|
3242
|
+
x(jo)
|
|
3243
|
+
])) : (w(), V("div", Xo, " Please contact your administrator to apply the changes. "))
|
|
3182
3244
|
];
|
|
3183
3245
|
}),
|
|
3184
|
-
"side-sheet-footer":
|
|
3185
|
-
a("div",
|
|
3186
|
-
|
|
3246
|
+
"side-sheet-footer": R(() => [
|
|
3247
|
+
a("div", Qo, [
|
|
3248
|
+
x(h, {
|
|
3187
3249
|
variant: "tertiary",
|
|
3188
|
-
label:
|
|
3189
|
-
onClick: l[0] || (l[0] = (p) =>
|
|
3250
|
+
label: I(t)("common.close"),
|
|
3251
|
+
onClick: l[0] || (l[0] = (p) => u("update:show", !1))
|
|
3190
3252
|
}, null, 8, ["label"])
|
|
3191
3253
|
])
|
|
3192
3254
|
]),
|
|
3193
3255
|
_: 2
|
|
3194
3256
|
}, [
|
|
3195
|
-
(
|
|
3257
|
+
(k = I(s).sessionUser.value) != null && k.role.isAdmin ? {
|
|
3196
3258
|
name: "side-sheet-header",
|
|
3197
|
-
fn:
|
|
3259
|
+
fn: R(() => {
|
|
3198
3260
|
var p;
|
|
3199
3261
|
return [
|
|
3200
|
-
a("div",
|
|
3201
|
-
a("div",
|
|
3262
|
+
a("div", To, [
|
|
3263
|
+
a("div", zo, [
|
|
3202
3264
|
l[2] || (l[2] = a("div", { class: "fm-typo-en-title-md-600" }, "Data migration (Synergy)", -1)),
|
|
3203
|
-
a("div",
|
|
3204
|
-
|
|
3205
|
-
name:
|
|
3265
|
+
a("div", Ho, [
|
|
3266
|
+
x(r, {
|
|
3267
|
+
name: I(S),
|
|
3206
3268
|
size: "sm"
|
|
3207
3269
|
}, null, 8, ["name"]),
|
|
3208
|
-
a("div",
|
|
3270
|
+
a("div", _o, j((p = I(b)._currentLocation) == null ? void 0 : p.name), 1)
|
|
3209
3271
|
])
|
|
3210
3272
|
])
|
|
3211
3273
|
])
|
|
@@ -3216,17 +3278,17 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3216
3278
|
]), 1032, ["modelValue"]);
|
|
3217
3279
|
};
|
|
3218
3280
|
}
|
|
3219
|
-
}),
|
|
3281
|
+
}), Jo = /* @__PURE__ */ Y({
|
|
3220
3282
|
__name: "SynergyView",
|
|
3221
3283
|
setup(F) {
|
|
3222
|
-
const
|
|
3284
|
+
const g = Le(), s = W(), i = M(!1);
|
|
3223
3285
|
async function n() {
|
|
3224
|
-
|
|
3286
|
+
i.value = !0, console.log("Opening Synergy migration dialog");
|
|
3225
3287
|
}
|
|
3226
|
-
return (t,
|
|
3227
|
-
const
|
|
3228
|
-
return
|
|
3229
|
-
|
|
3288
|
+
return (t, u) => {
|
|
3289
|
+
const b = E("FmCardSection"), S = E("FmCard");
|
|
3290
|
+
return I(g).enabledSynergyOpeningMigration && !I(s).businessLevel ? (w(), V(J, { key: 0 }, [
|
|
3291
|
+
x(S, {
|
|
3230
3292
|
class: q({
|
|
3231
3293
|
"w-full": !0,
|
|
3232
3294
|
border: !0,
|
|
@@ -3234,11 +3296,11 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3234
3296
|
"cursor-pointer": !0,
|
|
3235
3297
|
"hover:border-fm-color-primary": !0
|
|
3236
3298
|
}),
|
|
3237
|
-
onClick:
|
|
3299
|
+
onClick: u[0] || (u[0] = (y) => n())
|
|
3238
3300
|
}, {
|
|
3239
|
-
default:
|
|
3240
|
-
|
|
3241
|
-
default:
|
|
3301
|
+
default: R(() => [
|
|
3302
|
+
x(b, null, {
|
|
3303
|
+
default: R(() => u[2] || (u[2] = [
|
|
3242
3304
|
a("div", { class: "flex justify-center" }, [
|
|
3243
3305
|
a("div", { class: "size-[100px] bg-gray-200 rounded-lg flex items-center justify-center" }, [
|
|
3244
3306
|
a("span", { class: "text-lg font-bold text-gray-600" }, "Synergy")
|
|
@@ -3255,42 +3317,42 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3255
3317
|
_: 1
|
|
3256
3318
|
}),
|
|
3257
3319
|
(w(), X(ue, { to: "body" }, [
|
|
3258
|
-
|
|
3259
|
-
show:
|
|
3260
|
-
"onUpdate:show":
|
|
3320
|
+
x(Yo, {
|
|
3321
|
+
show: i.value,
|
|
3322
|
+
"onUpdate:show": u[1] || (u[1] = (y) => i.value = y)
|
|
3261
3323
|
}, null, 8, ["show"])
|
|
3262
3324
|
]))
|
|
3263
3325
|
], 64)) : _("", !0);
|
|
3264
3326
|
};
|
|
3265
3327
|
}
|
|
3266
|
-
}),
|
|
3328
|
+
}), Ko = { key: 0 }, Zo = {
|
|
3267
3329
|
key: 1,
|
|
3268
3330
|
class: "flex flex-col items-center my-10 gap-5"
|
|
3269
|
-
},
|
|
3331
|
+
}, qo = ["src"], Go = {
|
|
3270
3332
|
class: "text-xs text-neutral-400 text-center",
|
|
3271
3333
|
style: { "max-width": "25rem" }
|
|
3272
|
-
},
|
|
3334
|
+
}, Po = {
|
|
3273
3335
|
key: 2,
|
|
3274
3336
|
class: "grid grid-cols-2 gap-5"
|
|
3275
|
-
},
|
|
3337
|
+
}, ls = /* @__PURE__ */ Y({
|
|
3276
3338
|
__name: "IntegrationView",
|
|
3277
3339
|
setup(F) {
|
|
3278
|
-
const
|
|
3279
|
-
return
|
|
3280
|
-
if (
|
|
3340
|
+
const g = W(), s = M(!1), i = We(), { breakpoints: n } = Ve(), t = z(() => n.value.xs || n.value.sm), { t: u } = G();
|
|
3341
|
+
return fe(async () => {
|
|
3342
|
+
if (g._currentLocation) {
|
|
3281
3343
|
s.value = !0;
|
|
3282
3344
|
try {
|
|
3283
|
-
await
|
|
3345
|
+
await i.fetchFoodMarketHubSetting(), await i.fetchNetSuiteSetting();
|
|
3284
3346
|
} finally {
|
|
3285
3347
|
s.value = !1;
|
|
3286
3348
|
}
|
|
3287
3349
|
}
|
|
3288
|
-
}), (
|
|
3289
|
-
const
|
|
3350
|
+
}), (b, S) => {
|
|
3351
|
+
const y = E("FmCircularProgress");
|
|
3290
3352
|
return w(), X(Je, {
|
|
3291
|
-
title:
|
|
3353
|
+
title: I(u)("inventory.integration.title")
|
|
3292
3354
|
}, {
|
|
3293
|
-
default:
|
|
3355
|
+
default: R(() => [
|
|
3294
3356
|
a("div", {
|
|
3295
3357
|
class: q([
|
|
3296
3358
|
"flex flex-col gap-8 max-h-full",
|
|
@@ -3300,26 +3362,26 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3300
3362
|
}
|
|
3301
3363
|
])
|
|
3302
3364
|
}, [
|
|
3303
|
-
|
|
3365
|
+
x(Ke, {
|
|
3304
3366
|
"change-location": "",
|
|
3305
3367
|
showBusiness: ""
|
|
3306
3368
|
}),
|
|
3307
|
-
!
|
|
3308
|
-
|
|
3309
|
-
])) :
|
|
3369
|
+
!I(g)._currentLocation || s.value ? (w(), V("div", Ko, [
|
|
3370
|
+
x(y, { size: "lg" })
|
|
3371
|
+
])) : I(i).enabledIntegrations == 0 ? (w(), V("div", Zo, [
|
|
3310
3372
|
a("div", null, [
|
|
3311
3373
|
a("img", {
|
|
3312
|
-
src:
|
|
3374
|
+
src: I(He),
|
|
3313
3375
|
alt: "List is empty"
|
|
3314
|
-
}, null, 8,
|
|
3376
|
+
}, null, 8, qo)
|
|
3315
3377
|
]),
|
|
3316
|
-
|
|
3317
|
-
a("div",
|
|
3318
|
-
])) : (w(),
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3378
|
+
S[0] || (S[0] = a("div", { class: "font-bold text-lg" }, "Integration", -1)),
|
|
3379
|
+
a("div", Go, j(I(u)("inventory.integration.description")), 1)
|
|
3380
|
+
])) : (w(), V("div", Po, [
|
|
3381
|
+
x(Qn),
|
|
3382
|
+
x(Kt),
|
|
3383
|
+
x(bo),
|
|
3384
|
+
x(Jo)
|
|
3323
3385
|
]))
|
|
3324
3386
|
], 2)
|
|
3325
3387
|
]),
|
|
@@ -3329,5 +3391,5 @@ const bo = { class: "flex flex-col gap-4" }, ho = { class: "flex flex-col" }, Io
|
|
|
3329
3391
|
}
|
|
3330
3392
|
});
|
|
3331
3393
|
export {
|
|
3332
|
-
|
|
3394
|
+
ls as default
|
|
3333
3395
|
};
|