@feedmepos/mf-inventory-portal 1.8.0-dev.4 → 1.8.0-dev.6
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-FeJnwZme.js → App-B8DzC8Td.js} +609 -558
- package/dist/{ApprovalView-Eo-cGWyA.js → ApprovalView-DwHtlnLK.js} +9 -9
- package/dist/{BindingsDialog-DkjuXydb.js → BindingsDialog-COSQ6XVU.js} +2 -2
- package/dist/{BindingsPicker-DUOQcOlj.js → BindingsPicker-vn2GwOb7.js} +2 -2
- package/dist/{BindingsTable-CoDdU5xh.js → BindingsTable-B3-YXiPU.js} +4 -4
- package/dist/{BulkReceiveRequestView-BGh8fbEX.js → BulkReceiveRequestView-LUAuL39I.js} +19 -19
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CStISRqy.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bq2bBCHH.js} +1 -1
- package/dist/{ClosingDraftView-Cwnhrv5P.js → ClosingDraftView-BKgjXfss.js} +20 -20
- package/dist/{ClosingHistoryView-oHf77Lal.js → ClosingHistoryView-BI_zufKI.js} +5 -5
- package/dist/{ClosingTemplateView-1P8J1vAn.js → ClosingTemplateView-CNNgkrX0.js} +18 -18
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuEPaqQK.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DGxUjcQc.js} +1 -1
- package/dist/{DefaultView-3Z8aVFSU.js → DefaultView-D9ldG5wf.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-uT_e3Suw.js → DeliveryOrderPrintPreview-CnvuZat5.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BCgnXxEi.js → EmailDialog.vue_vue_type_script_setup_true_lang-s0eDfL8g.js} +23 -23
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-2t_ajTtF.js +297 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Bo4aCSFL.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKkxn1J-.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhKFtnX.js} +2 -2
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-dOXDST-E.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Dx8b6nGn.js} +2 -2
- package/dist/FmMultiselectDialog-Coxul96n.js +123 -0
- package/dist/{FmMultiselectDialog-DRxZAkcu.js → FmMultiselectDialog-zaOH0oB9.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DRSzQqVJ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B0xT-sP9.js} +6 -6
- package/dist/ImportView-CuRogJ1u.js +1291 -0
- package/dist/{IngredientsView-N9U7tdI_.js → IngredientsView-BnEJ1QAk.js} +34 -35
- package/dist/{IntegrationExplorerView-CjmeGQ14.js → IntegrationExplorerView-DB-7hXUE.js} +4 -4
- package/dist/{IntegrationView-DAdpmuxx.js → IntegrationView-CBGPi1xL.js} +973 -974
- package/dist/{InventoryBindingForm-CAj3MurI.js → InventoryBindingForm-eggGypKW.js} +1 -1
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CvQ82oaY.js +472 -0
- package/dist/{InventoryBindingSummary-B-1OBUdw.js → InventoryBindingSummary-DegINJdx.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CUYYEuW3.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DYq61C5M.js} +1 -1
- package/dist/{ProductionRunDetailView-eFvl8-By.js → ProductionRunDetailView-6uJmjwAg.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DaC7e4qS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-Dcd3sV5C.js} +9 -9
- package/dist/{ProductionRunView-C_NJJKLr.js → ProductionRunView-CiypqoQT.js} +3 -3
- package/dist/{PublishView-BglAEkzU.js → PublishView-DEyODScT.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BTF9ikpQ.js → PurchaseOrderPrintPreview-DjsD8HaB.js} +2 -2
- package/dist/{ReceiveRequestView-BUvehG10.js → ReceiveRequestView-DGWA-SOC.js} +13 -13
- package/dist/RecipeView-CO5kxazA.js +3428 -0
- package/dist/{SettingsView-DRR86cHo.js → SettingsView-9uq0QYht.js} +164 -168
- package/dist/{StockView-D1oEnbZp.js → StockView-YKfyjTE1.js} +267 -267
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxU92-io.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C8q3IBMg.js} +1 -1
- package/dist/{SupplierView-D68wz0-g.js → SupplierView-D62RB87K.js} +14 -14
- package/dist/{SurchargeView-Cw9rTw2h.js → SurchargeView-DY4xuPN0.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Az-a1Dsp.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C27rA7Z_.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-sxbacO.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BhhvJtAf.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CsHfLaCv.js → TransferDetails.vue_vue_type_script_setup_true_lang-cvgA7DlK.js} +690 -666
- package/dist/{TransferTemplateView-CHPJMjYC.js → TransferTemplateView-DZk-6Z-1.js} +20 -20
- package/dist/{UnitCostHistoryView-DM8OzWhe.js → UnitCostHistoryView-C-aNhP72.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpwK5mFH.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-D655ehgk.js} +4 -4
- package/dist/{UnitView-90uR-ZzQ.js → UnitView-h2n8XNZr.js} +8 -8
- package/dist/{WarehouseView-Bulg6Vac.js → WarehouseView-gPPmrhxB.js} +8 -8
- package/dist/{WastageTemplateView-BmAHnnwm.js → WastageTemplateView-7bp-1vTP.js} +15 -15
- package/dist/api/feature-flags.d.ts +2 -0
- package/dist/api/license.d.ts +0 -2
- package/dist/{app-Ccdgbe4f.js → app-_FoXoYBy.js} +1640 -1829
- package/dist/app.d.ts +0 -150
- package/dist/app.js +1 -1
- package/dist/{closing-template-DuBZxoXx.js → closing-template-D8bk-LUW.js} +1 -1
- package/dist/{date2-IBrLdtni.js → date2-DE0h0f1Z.js} +1 -1
- package/dist/{dayjs.min-DEkq-Hpp.js → dayjs.min-DxnjPhAT.js} +1 -1
- package/dist/{decimal-g6jRdlSk.js → decimal-D9ZB4atK.js} +2 -2
- package/dist/{defineDeepModel-P5a5Ffpn.js → defineDeepModel-pn4B1f06.js} +1 -1
- package/dist/{duplicate-template-Do8s80ei.js → duplicate-template-DS-mr3MQ.js} +1 -1
- package/dist/{feature-ChVm5JED.js → feature-D0aaeyga.js} +1999 -3092
- package/dist/feature-flags/portal-feature-catalog.d.ts +0 -2
- package/dist/{format-time-from-id-BgbBOII7.js → format-time-from-id-CbFUj3BY.js} +1 -1
- package/dist/{format-unit-display-hSXy2iu6.js → format-unit-display-DulZiawi.js} +13 -13
- package/dist/helper/menu-usage-module.d.ts +1 -1
- package/dist/{id-to-date-DlGYysU8.js → id-to-date-CLCvDHvP.js} +1 -1
- package/dist/{import-export.helper-LrZhiz2W.js → import-export.helper-Ce1hr39u.js} +6 -6
- package/dist/{index-DCiNwlw2.js → index-DDw8ryXI.js} +1 -1
- package/dist/{index-DsOmtywr.js → index-DpxJ3TzB.js} +1 -1
- package/dist/{index-BTNJ1fk2.js → index-DrkUq9y6.js} +3 -3
- package/dist/{lz-string-DRuyjE9G.js → lz-string-BakfyAq0.js} +1 -1
- package/dist/{netsuite-B6y8GZCP.js → netsuite-Cn2W-lOV.js} +2 -2
- package/dist/{number-Besn-1-5.js → number-B2-Gbof3.js} +3 -3
- package/dist/{predefined-templates-D92mN_2S.js → predefined-templates-DmITBHzs.js} +1 -1
- package/dist/{purchase-order-template-hvq2pfWx.js → purchase-order-template-BfP6Sy0k.js} +1 -1
- package/dist/{recalculationUtils-BlZR5O2G.js → recalculationUtils-BRe2QPvC.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/{row-action.enum-R2bi3eAv.js → row-action.enum-CxzHcy4A.js} +1 -1
- package/dist/{rules-DzwoRKUS.js → rules-CjqBvFGt.js} +2 -2
- package/dist/{stock-Cq37EARQ.js → stock-BT50AgTx.js} +8 -8
- package/dist/{stock-oJqnUrtt.js → stock-CjFjkezq.js} +1 -1
- package/dist/stores/feature.d.ts +9 -9
- package/dist/stores/inventory.d.ts +0 -47
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DtdwvcPr.js → supplier-wmjWWKaf.js} +2 -2
- package/dist/{surcharge-CjdJGIsM.js → surcharge-CQC6Fa7Q.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-BqPn_GoZ.js → uom-rules-CUQleOt4.js} +1 -1
- package/dist/{use-ingredient-select-dialog-0hRCj6Fu.js → use-ingredient-select-dialog-7VVHmM7s.js} +2 -2
- package/dist/use-inventory-binding-dialog-C8m7iwRG.js +113 -0
- package/dist/{use-template-enabled-locations-8ZfTj4YB.js → use-template-enabled-locations-CRgTVDMh.js} +2 -2
- package/dist/{use-transfer-locations-BGS1EBEt.js → use-transfer-locations-Bs0PotVA.js} +2 -2
- package/dist/{useHrmPermission-BcQ2KPD-.js → useHrmPermission-DcAzZ0CT.js} +1 -1
- package/dist/{useNavigationMenu-DImtns81.js → useNavigationMenu-CtihCeyC.js} +65 -74
- package/dist/{useSseClient-DPSFFVci.js → useSseClient-CizgYCQI.js} +1 -1
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
- package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
- package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
- package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
- package/dist/{vue-i18n-DTyGIjTI.js → vue-i18n-DpTQ6ev1.js} +258 -258
- package/dist/{xlsx.util-CK9Lnq3Q.js → xlsx.util-CPC0Dkyo.js} +2 -2
- package/package.json +2 -2
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js +0 -58
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js +0 -81
- package/dist/FmMultiselectDialog-C8uYx8rr.js +0 -77
- package/dist/ImportView-Qigtf3ik.js +0 -1302
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8PJeYrP.js +0 -51
- package/dist/IngredientGroupView-RNYZLkQu.js +0 -1000
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-3pYuu62C.js +0 -563
- package/dist/RecipeView-DO5-jgwh.js +0 -3624
- package/dist/feature-flags/premium-flags.spec.d.ts +0 -1
- package/dist/random-CSbEbElR.js +0 -10
- package/dist/use-inventory-binding-dialog-BLRcIC1u.js +0 -152
- package/dist/usePromise-CbVUCxhj.js +0 -29
- package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +0 -3
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
- package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { ref as k, onUnmounted as
|
|
1
|
+
import { ref as k, onUnmounted as pt, computed as F, defineComponent as re, watch as Z, onMounted as Ie, resolveComponent as z, createElementBlock as c, openBlock as i, createBlock as ce, createCommentVNode as N, unref as $, createVNode as C, createElementVNode as g, toDisplayString as h, Fragment as H, renderList as ae, withKeys as Me, normalizeClass as le, withModifiers as vt, withCtx as te, createTextVNode as ue, h as gt, onBeforeUnmount as yt, nextTick as ht, Teleport as _t, normalizeStyle as bt, mergeModels as Le, useModel as He } from "vue";
|
|
2
2
|
import { _ as xt } from "./empty-placeholder-B0QU467o.js";
|
|
3
|
-
import { u as
|
|
3
|
+
import { u as Je, a as Ye, R as pe, d as wt, S as kt, b as St } from "./app-_FoXoYBy.js";
|
|
4
4
|
import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { u as Ct
|
|
7
|
-
import { u as Lt } from "./netsuite-
|
|
8
|
-
import { u as
|
|
5
|
+
import { useRouter as Ne, useRoute as $t } from "vue-router";
|
|
6
|
+
import { u as Ct } from "./feature-D0aaeyga.js";
|
|
7
|
+
import { u as Lt } from "./netsuite-Cn2W-lOV.js";
|
|
8
|
+
import { u as We, n as Dt, e as Rt } from "./useNavigationMenu-CtihCeyC.js";
|
|
9
9
|
import { useBreakpoints as Vt } from "@feedmepos/ui-library";
|
|
10
|
-
import { F as
|
|
11
|
-
import { i as
|
|
12
|
-
import { F as Nt } from "./decimal-
|
|
13
|
-
import { t as Pt, a as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { u as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as Mt } from "./DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js";
|
|
10
|
+
import { F as Xe } from "./FmAdminBadge-DlplQOHb.js";
|
|
11
|
+
import { i as Ft, _ as It } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Bo4aCSFL.js";
|
|
12
|
+
import { F as Nt } from "./decimal-D9ZB4atK.js";
|
|
13
|
+
import { t as Pt, a as Bt } from "./date2-DE0h0f1Z.js";
|
|
14
|
+
import { _ as Et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
import { u as Tt } from "./useTabStorage-BkIVScW_.js";
|
|
16
|
+
import { _ as Ut, D as At, u as Mt, g as Oe } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-2t_ajTtF.js";
|
|
18
17
|
import { u as Ot } from "./googlemap-D9vA7GsS.js";
|
|
19
18
|
function Kt() {
|
|
20
19
|
return {
|
|
@@ -23,8 +22,8 @@ function Kt() {
|
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
24
|
const me = k(Kt());
|
|
26
|
-
function
|
|
27
|
-
const o =
|
|
25
|
+
function zt() {
|
|
26
|
+
const o = Ne();
|
|
28
27
|
if (!me.value.loadingHookInstalled) {
|
|
29
28
|
me.value.loadingHookInstalled = !0;
|
|
30
29
|
const e = o.beforeEach(() => {
|
|
@@ -32,7 +31,7 @@ function Gt() {
|
|
|
32
31
|
}), t = o.afterEach(() => {
|
|
33
32
|
me.value.isLoading = !1;
|
|
34
33
|
});
|
|
35
|
-
|
|
34
|
+
pt(() => {
|
|
36
35
|
me.value.loadingHookInstalled = !1, e(), t();
|
|
37
36
|
});
|
|
38
37
|
}
|
|
@@ -42,11 +41,11 @@ function Gt() {
|
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
function
|
|
46
|
-
const { firstAccessibleRouteName: o } =
|
|
47
|
-
return { hasAnyAccessibleInventoryRoute:
|
|
44
|
+
function jt() {
|
|
45
|
+
const { firstAccessibleRouteName: o } = We();
|
|
46
|
+
return { hasAnyAccessibleInventoryRoute: F(() => o.value !== null) };
|
|
48
47
|
}
|
|
49
|
-
const
|
|
48
|
+
const Gt = {
|
|
50
49
|
key: 0,
|
|
51
50
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
52
51
|
}, Ht = {
|
|
@@ -55,75 +54,75 @@ const jt = {
|
|
|
55
54
|
}, Jt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Wt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = {
|
|
56
55
|
key: 2,
|
|
57
56
|
class: "flex flex-col pt-[200px] gap-32 items-center"
|
|
58
|
-
}, qt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Zt = { class: "fm-typo-en-title-lg-600" }, Qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, en = { class: "flex gap-16" }, tn = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, nn = { href: "https://feedme.ai/form" }, on = /* @__PURE__ */
|
|
57
|
+
}, qt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Zt = { class: "fm-typo-en-title-lg-600" }, Qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, en = { class: "flex gap-16" }, tn = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, nn = { href: "https://feedme.ai/form" }, on = /* @__PURE__ */ re({
|
|
59
58
|
__name: "InventoryView",
|
|
60
59
|
setup(o) {
|
|
61
|
-
const e =
|
|
60
|
+
const e = Je(), t = Ye(), s = Lt(), a = ge(), l = Ne(), r = zt(), u = Ct(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = jt();
|
|
62
61
|
Z(
|
|
63
62
|
[() => a.sessionUser.value, () => a.currentBusiness.value],
|
|
64
|
-
([O,
|
|
65
|
-
|
|
63
|
+
([O, D]) => {
|
|
64
|
+
L(O, D);
|
|
66
65
|
}
|
|
67
66
|
), Ie(async () => {
|
|
68
67
|
await u.init(), await a.readBusinesses();
|
|
69
|
-
const O = a.sessionUser.value,
|
|
70
|
-
|
|
68
|
+
const O = a.sessionUser.value, D = a.currentBusiness.value;
|
|
69
|
+
L(O, D);
|
|
71
70
|
});
|
|
72
|
-
function
|
|
73
|
-
!O || !
|
|
71
|
+
function L(O, D) {
|
|
72
|
+
!O || !D || I();
|
|
74
73
|
}
|
|
75
|
-
async function
|
|
76
|
-
return await e.init(), await
|
|
74
|
+
async function I() {
|
|
75
|
+
return await e.init(), await s.readSetting().catch((O) => {
|
|
77
76
|
console.error("[all] error on reading netsuite store", O);
|
|
78
77
|
}), await t.init();
|
|
79
78
|
}
|
|
80
|
-
const P =
|
|
81
|
-
() =>
|
|
82
|
-
var
|
|
83
|
-
const
|
|
84
|
-
return (((
|
|
79
|
+
const P = F(() => l.currentRoute.value.name === pe.TRANSFER_TEMPLATE ? u.enablePoTemplate : !0), U = F(
|
|
80
|
+
() => l.currentRoute.value.matched.some((O) => {
|
|
81
|
+
var R;
|
|
82
|
+
const D = O.meta, J = D == null ? void 0 : D.validationManifest;
|
|
83
|
+
return (((R = J == null ? void 0 : J.requiredCaslPermissions) == null ? void 0 : R.length) ?? 0) > 0;
|
|
85
84
|
})
|
|
86
|
-
), Q =
|
|
85
|
+
), Q = F(() => {
|
|
87
86
|
if (!a.sessionUser.value) return !1;
|
|
88
87
|
if (e._locations !== null && e.locations.length === 0) return !0;
|
|
89
88
|
if (!u.isLoaded) return !1;
|
|
90
|
-
const
|
|
91
|
-
return !p.value && (
|
|
89
|
+
const J = l.currentRoute.value.name === pe.LOADING;
|
|
90
|
+
return !p.value && (J || U.value);
|
|
92
91
|
});
|
|
93
|
-
return (O,
|
|
94
|
-
const
|
|
92
|
+
return (O, D) => {
|
|
93
|
+
const J = z("FmSpacer"), R = z("FmCircularProgress"), _ = z("FmButton"), w = z("RouterView");
|
|
95
94
|
return i(), c("div", null, [
|
|
96
|
-
$(r).isLoading ? (i(), c("div",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
$(r).isLoading ? (i(), c("div", Gt, [
|
|
96
|
+
C(J),
|
|
97
|
+
g("div", null, [
|
|
98
|
+
C(R, { size: "xl" })
|
|
100
99
|
]),
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
D[0] || (D[0] = g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
|
|
101
|
+
C(J)
|
|
103
102
|
])) : Q.value ? (i(), c("div", Ht, [
|
|
104
|
-
|
|
103
|
+
D[1] || (D[1] = g("img", {
|
|
105
104
|
src: xt,
|
|
106
105
|
alt: "No permission",
|
|
107
106
|
class: "w-[200px] h-[200px]"
|
|
108
107
|
}, null, -1)),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
g("div", Jt, [
|
|
109
|
+
g("div", Yt, h($(v)("inventory.common.noPermission.title")), 1),
|
|
110
|
+
g("div", Wt, h($(v)("inventory.common.noPermission.description")), 1)
|
|
112
111
|
])
|
|
113
|
-
])) : P.value ? $(a).sessionUser.value ? (i(),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
])) : P.value ? $(a).sessionUser.value ? (i(), ce(w, { key: 3 })) : N("", !0) : (i(), c("div", Xt, [
|
|
113
|
+
g("div", qt, [
|
|
114
|
+
g("div", Zt, h($(v)("inventory.common.proPlan.title")), 1),
|
|
115
|
+
g("div", Qt, h($(v)("inventory.common.proPlan.subtitle")), 1)
|
|
117
116
|
]),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
g("div", en, [
|
|
118
|
+
g("a", tn, [
|
|
119
|
+
C(_, {
|
|
121
120
|
label: $(v)("inventory.common.proPlan.comparePlans"),
|
|
122
121
|
variant: "secondary"
|
|
123
122
|
}, null, 8, ["label"])
|
|
124
123
|
]),
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
g("a", nn, [
|
|
125
|
+
C(_, {
|
|
127
126
|
label: $(v)("inventory.common.proPlan.callUs"),
|
|
128
127
|
"prepend-icon": "call"
|
|
129
128
|
}, null, 8, ["label"])
|
|
@@ -133,7 +132,7 @@ const jt = {
|
|
|
133
132
|
]);
|
|
134
133
|
};
|
|
135
134
|
}
|
|
136
|
-
}),
|
|
135
|
+
}), De = {
|
|
137
136
|
// Template/PO item rows carry no id of their own — the embedded sku's _id is
|
|
138
137
|
// the element identity, and kit names the element from that object's name
|
|
139
138
|
// field, so an item change reads "Items › <sku name> › …" instead of a bare
|
|
@@ -196,7 +195,7 @@ const jt = {
|
|
|
196
195
|
]
|
|
197
196
|
}
|
|
198
197
|
}, Re = {
|
|
199
|
-
...
|
|
198
|
+
...De,
|
|
200
199
|
array_keys: {
|
|
201
200
|
measurements: "id",
|
|
202
201
|
"unit.measurements": "id",
|
|
@@ -215,22 +214,22 @@ const _e = wt((o, e) => ({
|
|
|
215
214
|
* The dbName scopes the (access-checked) backend route; only the bare id is
|
|
216
215
|
* sent — the backend rebuilds the docId server-side.
|
|
217
216
|
*/
|
|
218
|
-
async getRecordChangelog(t,
|
|
217
|
+
async getRecordChangelog(t, s, a, l) {
|
|
219
218
|
const r = t.indexOf("/");
|
|
220
219
|
if (r < 0) return [];
|
|
221
220
|
const u = t.slice(0, r), v = t.slice(r + 1), p = new URLSearchParams({ id: v });
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
return await e.get(
|
|
221
|
+
s != null && p.set("limit", String(s)), l && p.set("before", l), a && (p.set("explain", "1"), p.set("schema", JSON.stringify(a)));
|
|
222
|
+
const L = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
|
|
223
|
+
return await e.get(L);
|
|
225
224
|
},
|
|
226
225
|
/**
|
|
227
226
|
* Purchase orders in a date range, each with when it last changed. The
|
|
228
227
|
* backend joins the orders to their newest commit, so no ids travel and the
|
|
229
228
|
* browser makes one request instead of list-then-ask-for-timestamps.
|
|
230
229
|
*/
|
|
231
|
-
async listPurchaseOrders(t,
|
|
230
|
+
async listPurchaseOrders(t, s, a) {
|
|
232
231
|
if (!t) return [];
|
|
233
|
-
const
|
|
232
|
+
const l = new URLSearchParams({ start: s, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${l}`;
|
|
234
233
|
return await e.get(r);
|
|
235
234
|
},
|
|
236
235
|
/**
|
|
@@ -238,9 +237,9 @@ const _e = wt((o, e) => ({
|
|
|
238
237
|
* Closing groups come back as rows of their own — their submit/approve/
|
|
239
238
|
* reject is recorded against the group document, not its parent.
|
|
240
239
|
*/
|
|
241
|
-
async listClosingDrafts(t,
|
|
240
|
+
async listClosingDrafts(t, s, a) {
|
|
242
241
|
if (!t) return [];
|
|
243
|
-
const
|
|
242
|
+
const l = new URLSearchParams({ start: s, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${l}`;
|
|
244
243
|
return await e.get(r);
|
|
245
244
|
},
|
|
246
245
|
/**
|
|
@@ -249,10 +248,10 @@ const _e = wt((o, e) => ({
|
|
|
249
248
|
* 409 (see isStateConflict) when the record's history predates the kit
|
|
250
249
|
* write path — the backend passthrough for kit httpapi's GET /api/state.
|
|
251
250
|
*/
|
|
252
|
-
async getState(t,
|
|
253
|
-
const
|
|
254
|
-
a &&
|
|
255
|
-
const r = `${o.inventoryBackendUrl}/${t}/changelog/state?${
|
|
251
|
+
async getState(t, s, a) {
|
|
252
|
+
const l = new URLSearchParams({ id: s });
|
|
253
|
+
a && l.set("at", a);
|
|
254
|
+
const r = `${o.inventoryBackendUrl}/${t}/changelog/state?${l.toString()}`;
|
|
256
255
|
return await e.get(r);
|
|
257
256
|
},
|
|
258
257
|
/**
|
|
@@ -263,17 +262,17 @@ const _e = wt((o, e) => ({
|
|
|
263
262
|
*/
|
|
264
263
|
async listDomains(t) {
|
|
265
264
|
if (!t) return [];
|
|
266
|
-
const
|
|
267
|
-
return await e.get(
|
|
265
|
+
const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
|
|
266
|
+
return await e.get(s);
|
|
268
267
|
},
|
|
269
268
|
/**
|
|
270
269
|
* One generic domain's records, each with when it last changed. Business-
|
|
271
270
|
* scoped: the generic domains are configuration documents of the business
|
|
272
271
|
* db, not of a location.
|
|
273
272
|
*/
|
|
274
|
-
async listDomainRecords(t,
|
|
273
|
+
async listDomainRecords(t, s) {
|
|
275
274
|
if (!t) return [];
|
|
276
|
-
const a = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(
|
|
275
|
+
const a = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(s)}`;
|
|
277
276
|
return await e.get(a);
|
|
278
277
|
},
|
|
279
278
|
/**
|
|
@@ -281,65 +280,65 @@ const _e = wt((o, e) => ({
|
|
|
281
280
|
* scoped, so the db is `business_<id>` — the same prefixed name the record's
|
|
282
281
|
* own changelog docId carries.
|
|
283
282
|
*/
|
|
284
|
-
async listInventory(t,
|
|
283
|
+
async listInventory(t, s) {
|
|
285
284
|
if (!t) return [];
|
|
286
|
-
const a = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${
|
|
285
|
+
const a = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${s}`;
|
|
287
286
|
return await e.get(a);
|
|
288
287
|
}
|
|
289
288
|
})), Se = 50;
|
|
290
|
-
function
|
|
291
|
-
const o = _e(), e = k([]), t = k(!1),
|
|
292
|
-
let a = null,
|
|
293
|
-
async function r(v, p,
|
|
294
|
-
const
|
|
295
|
-
if (a = null,
|
|
289
|
+
function ln() {
|
|
290
|
+
const o = _e(), e = k([]), t = k(!1), s = k(!1);
|
|
291
|
+
let a = null, l = 0;
|
|
292
|
+
async function r(v, p, L) {
|
|
293
|
+
const I = ++l;
|
|
294
|
+
if (a = null, s.value = !1, !v) {
|
|
296
295
|
e.value = [];
|
|
297
296
|
return;
|
|
298
297
|
}
|
|
299
298
|
t.value = !0;
|
|
300
299
|
try {
|
|
301
|
-
const P = p ?? Se,
|
|
302
|
-
if (
|
|
303
|
-
e.value =
|
|
300
|
+
const P = p ?? Se, U = await o.getRecordChangelog(v, P, L);
|
|
301
|
+
if (I !== l) return;
|
|
302
|
+
e.value = U, p == null && (a = { recordId: v, explain: L }, s.value = U.length === P);
|
|
304
303
|
} catch (P) {
|
|
305
|
-
throw
|
|
304
|
+
throw I === l && (e.value = []), P;
|
|
306
305
|
} finally {
|
|
307
|
-
|
|
306
|
+
I === l && (t.value = !1);
|
|
308
307
|
}
|
|
309
308
|
}
|
|
310
309
|
async function u() {
|
|
311
310
|
const v = e.value[e.value.length - 1];
|
|
312
|
-
if (!a || !v || t.value || !
|
|
313
|
-
const p =
|
|
311
|
+
if (!a || !v || t.value || !s.value) return;
|
|
312
|
+
const p = l;
|
|
314
313
|
t.value = !0;
|
|
315
314
|
try {
|
|
316
|
-
const
|
|
317
|
-
if (p !==
|
|
318
|
-
e.value = [...e.value, ...
|
|
315
|
+
const L = await o.getRecordChangelog(a.recordId, Se, a.explain, v.id);
|
|
316
|
+
if (p !== l) return;
|
|
317
|
+
e.value = [...e.value, ...L], s.value = L.length === Se;
|
|
319
318
|
} finally {
|
|
320
|
-
p ===
|
|
319
|
+
p === l && (t.value = !1);
|
|
321
320
|
}
|
|
322
321
|
}
|
|
323
|
-
return { commits: e, isLoading: t, hasMore:
|
|
322
|
+
return { commits: e, isLoading: t, hasMore: s, load: r, loadMore: u };
|
|
324
323
|
}
|
|
325
|
-
const
|
|
326
|
-
function
|
|
324
|
+
const qe = 1e3;
|
|
325
|
+
function Ke(o) {
|
|
327
326
|
const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
|
|
328
327
|
return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
|
|
329
328
|
}
|
|
330
|
-
function
|
|
329
|
+
function sn(o, e) {
|
|
331
330
|
return [...o, ...e].sort(
|
|
332
|
-
(t,
|
|
331
|
+
(t, s) => Ke(s.at).localeCompare(Ke(t.at)) || s.id.localeCompare(t.id)
|
|
333
332
|
);
|
|
334
333
|
}
|
|
335
334
|
function rn() {
|
|
336
335
|
const o = _e(), e = k([]);
|
|
337
|
-
async function t(
|
|
338
|
-
if (e.value = [], !!
|
|
336
|
+
async function t(s) {
|
|
337
|
+
if (e.value = [], !!s)
|
|
339
338
|
try {
|
|
340
339
|
e.value = await o.getRecordChangelog(
|
|
341
|
-
|
|
342
|
-
|
|
340
|
+
s,
|
|
341
|
+
qe,
|
|
343
342
|
Re
|
|
344
343
|
);
|
|
345
344
|
} catch (a) {
|
|
@@ -348,7 +347,7 @@ function rn() {
|
|
|
348
347
|
}
|
|
349
348
|
return { commits: e, load: t };
|
|
350
349
|
}
|
|
351
|
-
function
|
|
350
|
+
function Ze(o) {
|
|
352
351
|
if (!o) return null;
|
|
353
352
|
try {
|
|
354
353
|
const e = JSON.parse(o);
|
|
@@ -361,12 +360,12 @@ function Xe(o) {
|
|
|
361
360
|
return null;
|
|
362
361
|
}
|
|
363
362
|
}
|
|
364
|
-
function
|
|
363
|
+
function Qe(o) {
|
|
365
364
|
return o.startsWith("inventory.changelog.");
|
|
366
365
|
}
|
|
367
|
-
const
|
|
368
|
-
function
|
|
369
|
-
const e = o.indexOf(
|
|
366
|
+
const et = "";
|
|
367
|
+
function Ve(o) {
|
|
368
|
+
const e = o.indexOf(et);
|
|
370
369
|
return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
|
|
371
370
|
}
|
|
372
371
|
const un = [
|
|
@@ -375,29 +374,29 @@ const un = [
|
|
|
375
374
|
"inventory.changelog.label.unit"
|
|
376
375
|
], cn = [...un, "Recipe", "Ingredient", "Unit"];
|
|
377
376
|
function dn(o) {
|
|
378
|
-
const { human: e } =
|
|
377
|
+
const { human: e } = Ve(o);
|
|
379
378
|
if (!e) return { type: "Document", name: "", field: [] };
|
|
380
379
|
const t = e.split(" › ");
|
|
381
380
|
return t.length >= 2 && cn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
|
|
382
381
|
}
|
|
383
|
-
const
|
|
384
|
-
function
|
|
385
|
-
const
|
|
386
|
-
if (!
|
|
387
|
-
let
|
|
388
|
-
for (;
|
|
382
|
+
const ze = 800;
|
|
383
|
+
function tt(o, e, t = 2) {
|
|
384
|
+
const s = je(o), a = je(e);
|
|
385
|
+
if (!s || !a) return null;
|
|
386
|
+
let l = 0;
|
|
387
|
+
for (; l < s.length && l < a.length && s[l] === a[l]; ) l++;
|
|
389
388
|
let r = 0;
|
|
390
|
-
for (; r <
|
|
389
|
+
for (; r < s.length - l && r < a.length - l && s[s.length - 1 - r] === a[a.length - 1 - r]; )
|
|
391
390
|
r++;
|
|
392
|
-
const u =
|
|
393
|
-
if (u.length >
|
|
394
|
-
const p = (
|
|
391
|
+
const u = s.slice(l, s.length - r), v = a.slice(l, a.length - r);
|
|
392
|
+
if (u.length > ze || v.length > ze) return null;
|
|
393
|
+
const p = (L) => ({ type: "same", text: L });
|
|
395
394
|
return mn(
|
|
396
|
-
[...
|
|
395
|
+
[...s.slice(0, l).map(p), ...fn(u, v), ...s.slice(s.length - r).map(p)],
|
|
397
396
|
t
|
|
398
397
|
);
|
|
399
398
|
}
|
|
400
|
-
function
|
|
399
|
+
function je(o) {
|
|
401
400
|
try {
|
|
402
401
|
const e = JSON.parse(o);
|
|
403
402
|
return e === null || typeof e != "object" ? null : JSON.stringify(e, null, 2).split(`
|
|
@@ -407,30 +406,30 @@ function Ge(o) {
|
|
|
407
406
|
}
|
|
408
407
|
}
|
|
409
408
|
function fn(o, e) {
|
|
410
|
-
const t = o.length,
|
|
409
|
+
const t = o.length, s = e.length, a = Array.from({ length: t + 1 }, () => new Uint32Array(s + 1));
|
|
411
410
|
for (let v = t - 1; v >= 0; v--)
|
|
412
|
-
for (let p =
|
|
411
|
+
for (let p = s - 1; p >= 0; p--)
|
|
413
412
|
a[v][p] = o[v] === e[p] ? a[v + 1][p + 1] + 1 : Math.max(a[v + 1][p], a[v][p + 1]);
|
|
414
|
-
const
|
|
413
|
+
const l = [];
|
|
415
414
|
let r = 0, u = 0;
|
|
416
|
-
for (; r < t && u <
|
|
417
|
-
o[r] === e[u] ? (
|
|
418
|
-
for (; r < t; )
|
|
419
|
-
for (; u <
|
|
420
|
-
return
|
|
415
|
+
for (; r < t && u < s; )
|
|
416
|
+
o[r] === e[u] ? (l.push({ type: "same", text: o[r] }), r++, u++) : a[r + 1][u] >= a[r][u + 1] ? (l.push({ type: "del", text: o[r] }), r++) : (l.push({ type: "add", text: e[u] }), u++);
|
|
417
|
+
for (; r < t; ) l.push({ type: "del", text: o[r++] });
|
|
418
|
+
for (; u < s; ) l.push({ type: "add", text: e[u++] });
|
|
419
|
+
return l;
|
|
421
420
|
}
|
|
422
421
|
function mn(o, e) {
|
|
423
422
|
const t = o.map(() => !1);
|
|
424
|
-
o.forEach((
|
|
425
|
-
if (
|
|
423
|
+
o.forEach((l, r) => {
|
|
424
|
+
if (l.type !== "same")
|
|
426
425
|
for (let u = Math.max(0, r - e); u <= Math.min(o.length - 1, r + e); u++)
|
|
427
426
|
t[u] = !0;
|
|
428
427
|
});
|
|
429
|
-
const
|
|
428
|
+
const s = [];
|
|
430
429
|
let a = !1;
|
|
431
|
-
return o.forEach((
|
|
432
|
-
t[r] ? (
|
|
433
|
-
}),
|
|
430
|
+
return o.forEach((l, r) => {
|
|
431
|
+
t[r] ? (s.push(l), a = !1) : a || (s.push({ type: "skip", text: "⋯" }), a = !0);
|
|
432
|
+
}), s;
|
|
434
433
|
}
|
|
435
434
|
function pn(o, e) {
|
|
436
435
|
let t;
|
|
@@ -441,59 +440,59 @@ function pn(o, e) {
|
|
|
441
440
|
}
|
|
442
441
|
return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
|
|
443
442
|
}
|
|
444
|
-
function
|
|
443
|
+
function Fe(o, e, t = 0, s) {
|
|
445
444
|
var p;
|
|
446
|
-
const a = o.label == null ? void 0 :
|
|
447
|
-
|
|
445
|
+
const a = o.label == null ? void 0 : Qe(o.label) ? e(o.label) : o.label, l = a != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
|
|
446
|
+
l && u.push({
|
|
448
447
|
depth: t,
|
|
449
448
|
// A bare array index says nothing a reader needs — a leaf list entry
|
|
450
449
|
// shows just its value. Branch nodes keep the index as their header.
|
|
451
450
|
label: a != null && r && /^\d+$/.test(a) ? void 0 : a,
|
|
452
|
-
text: r ? vn(o, e,
|
|
451
|
+
text: r ? vn(o, e, s) : void 0,
|
|
453
452
|
bookkeeping: !!o.bookkeeping
|
|
454
453
|
});
|
|
455
|
-
const v =
|
|
456
|
-
for (const
|
|
457
|
-
u.push(...
|
|
454
|
+
const v = l ? t + 1 : t;
|
|
455
|
+
for (const L of o.kids ?? [])
|
|
456
|
+
u.push(...Fe(L, e, v, s));
|
|
458
457
|
return u;
|
|
459
458
|
}
|
|
460
459
|
function vn(o, e, t) {
|
|
461
460
|
if (o.value == null) return o.display || void 0;
|
|
462
|
-
const
|
|
463
|
-
return (t == null ? void 0 : t(
|
|
461
|
+
const s = pn(o.value, e);
|
|
462
|
+
return (t == null ? void 0 : t(s)) ?? o.display ?? s;
|
|
464
463
|
}
|
|
465
464
|
function $e(o, e) {
|
|
466
465
|
return JSON.stringify(o, null, 2).split(`
|
|
467
466
|
`).map((t) => ({ type: e, text: t }));
|
|
468
467
|
}
|
|
469
468
|
function gn() {
|
|
470
|
-
const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1),
|
|
471
|
-
async function a(
|
|
472
|
-
const r = e.get(
|
|
469
|
+
const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), s = k(null);
|
|
470
|
+
async function a(l) {
|
|
471
|
+
const r = e.get(l.id);
|
|
473
472
|
if (r) {
|
|
474
|
-
|
|
473
|
+
s.value = r;
|
|
475
474
|
return;
|
|
476
475
|
}
|
|
477
476
|
t.value = !0;
|
|
478
477
|
try {
|
|
479
|
-
const u =
|
|
480
|
-
|
|
481
|
-
o.getState(v, p,
|
|
482
|
-
]),
|
|
483
|
-
...$e(
|
|
484
|
-
...$e(
|
|
485
|
-
] : $e(
|
|
486
|
-
e.set(
|
|
478
|
+
const u = l.doc_id.indexOf("/"), v = l.doc_id.slice(0, u), p = l.doc_id.slice(u + 1), [L, I] = await Promise.all([
|
|
479
|
+
l.parent ? o.getState(v, p, l.parent) : Promise.resolve({}),
|
|
480
|
+
o.getState(v, p, l.id)
|
|
481
|
+
]), U = { diff: l.parent ? tt(JSON.stringify(L), JSON.stringify(I)) ?? [
|
|
482
|
+
...$e(L, "del"),
|
|
483
|
+
...$e(I, "add")
|
|
484
|
+
] : $e(I, "add"), conflict: !1 };
|
|
485
|
+
e.set(l.id, U), s.value = U;
|
|
487
486
|
} catch (u) {
|
|
488
487
|
if (!an(u))
|
|
489
|
-
throw
|
|
488
|
+
throw s.value = null, u;
|
|
490
489
|
const v = { diff: null, conflict: !0 };
|
|
491
|
-
e.set(
|
|
490
|
+
e.set(l.id, v), s.value = v;
|
|
492
491
|
} finally {
|
|
493
492
|
t.value = !1;
|
|
494
493
|
}
|
|
495
494
|
}
|
|
496
|
-
return { isLoading: t, result:
|
|
495
|
+
return { isLoading: t, result: s, load: a };
|
|
497
496
|
}
|
|
498
497
|
const yn = {
|
|
499
498
|
key: 0,
|
|
@@ -507,10 +506,10 @@ const yn = {
|
|
|
507
506
|
}, bn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, xn = ["onClick", "onKeydown"], wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "text-xs text-gray-500" }, Sn = {
|
|
508
507
|
key: 0,
|
|
509
508
|
class: "flex-1 overflow-y-auto pl-4"
|
|
510
|
-
}, $n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, Cn = { class: "flex flex-wrap items-center gap-8" }, Ln = { class: "fm-typo-en-body-lg-600" },
|
|
509
|
+
}, $n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, Cn = { class: "flex flex-wrap items-center gap-8" }, Ln = { class: "fm-typo-en-body-lg-600" }, Dn = {
|
|
511
510
|
key: 0,
|
|
512
511
|
class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
|
|
513
|
-
},
|
|
512
|
+
}, Rn = { class: "text-xs text-gray-500" }, Vn = { class: "mb-12" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, In = {
|
|
514
513
|
key: 0,
|
|
515
514
|
class: "mb-12"
|
|
516
515
|
}, Nn = {
|
|
@@ -519,10 +518,10 @@ const yn = {
|
|
|
519
518
|
}, Pn = {
|
|
520
519
|
key: 2,
|
|
521
520
|
class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
|
|
522
|
-
},
|
|
521
|
+
}, Bn = {
|
|
523
522
|
key: 0,
|
|
524
523
|
class: "text-xs text-gray-400"
|
|
525
|
-
},
|
|
524
|
+
}, En = { class: "fm-typo-en-body-md-600" }, Tn = { class: "flex flex-col gap-6" }, Un = {
|
|
526
525
|
key: 0,
|
|
527
526
|
class: "text-gray-700"
|
|
528
527
|
}, An = { class: "min-w-[120px] shrink-0 text-gray-500" }, Mn = {
|
|
@@ -531,10 +530,10 @@ const yn = {
|
|
|
531
530
|
}, On = {
|
|
532
531
|
key: 0,
|
|
533
532
|
class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
|
|
534
|
-
}, Kn = { key: 0 },
|
|
533
|
+
}, Kn = { key: 0 }, zn = { key: 1 }, jn = {
|
|
535
534
|
key: 1,
|
|
536
535
|
class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
|
|
537
|
-
},
|
|
536
|
+
}, Gn = { key: 0 }, Hn = { key: 1 }, Jn = {
|
|
538
537
|
key: 1,
|
|
539
538
|
class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
|
|
540
539
|
}, Yn = {
|
|
@@ -555,7 +554,7 @@ const yn = {
|
|
|
555
554
|
}, Qn = {
|
|
556
555
|
key: 2,
|
|
557
556
|
class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
|
|
558
|
-
}, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */
|
|
557
|
+
}, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */ re({
|
|
559
558
|
__name: "ChangelogPanel",
|
|
560
559
|
props: {
|
|
561
560
|
commits: {},
|
|
@@ -563,36 +562,36 @@ const yn = {
|
|
|
563
562
|
resolveName: { type: Function }
|
|
564
563
|
},
|
|
565
564
|
setup(o) {
|
|
566
|
-
const e = o, { t } = he(),
|
|
567
|
-
() => e.commits.find((f) => f.id ===
|
|
568
|
-
),
|
|
565
|
+
const e = o, { t } = he(), s = k(null), a = F(
|
|
566
|
+
() => e.commits.find((f) => f.id === s.value)
|
|
567
|
+
), l = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = F(() => {
|
|
569
568
|
var b;
|
|
570
569
|
return (((b = a.value) == null ? void 0 : b.changes) ?? []).filter((M) => {
|
|
571
|
-
const { raw: A } =
|
|
572
|
-
return A === "@payload" || M.from == null && M.to == null ? !1 : !A.split(".").some((X) =>
|
|
570
|
+
const { raw: A } = Ve(M.path);
|
|
571
|
+
return A === "@payload" || M.from == null && M.to == null ? !1 : !A.split(".").some((X) => l.has(X));
|
|
573
572
|
});
|
|
574
573
|
});
|
|
575
574
|
Z(
|
|
576
575
|
() => e.commits,
|
|
577
576
|
(f) => {
|
|
578
577
|
var b;
|
|
579
|
-
f.find((M) => M.id ===
|
|
578
|
+
f.find((M) => M.id === s.value) || (s.value = ((b = f[0]) == null ? void 0 : b.id) ?? null);
|
|
580
579
|
},
|
|
581
580
|
{ immediate: !0 }
|
|
582
581
|
);
|
|
583
|
-
const u = k(!1), { isLoading: v, result: p, load:
|
|
582
|
+
const u = k(!1), { isLoading: v, result: p, load: L } = gn();
|
|
584
583
|
Z([u, a], ([f, b]) => {
|
|
585
|
-
p.value = null, !(!f || !b) &&
|
|
584
|
+
p.value = null, !(!f || !b) && L(b).catch((M) => {
|
|
586
585
|
console.error("changelog snapshot load failed", M), u.value = !1;
|
|
587
586
|
});
|
|
588
587
|
});
|
|
589
|
-
function
|
|
588
|
+
function I(f) {
|
|
590
589
|
return f ? f.slice(0, 8) : "";
|
|
591
590
|
}
|
|
592
591
|
function P(f) {
|
|
593
592
|
return f ? new Date(f).toLocaleString() : "";
|
|
594
593
|
}
|
|
595
|
-
function
|
|
594
|
+
function U(f) {
|
|
596
595
|
if (f == null) return "";
|
|
597
596
|
let b;
|
|
598
597
|
try {
|
|
@@ -607,263 +606,263 @@ const yn = {
|
|
|
607
606
|
}
|
|
608
607
|
function O(f) {
|
|
609
608
|
if (f.message === to) return t("inventory.changelog.captureBaseline");
|
|
610
|
-
const b =
|
|
609
|
+
const b = Ze(f.message);
|
|
611
610
|
if (!b) return f.message || t("inventory.changelog.noMessage");
|
|
612
|
-
const M =
|
|
611
|
+
const M = D(b.labelKey);
|
|
613
612
|
return b.name ? t(`inventory.changelog.message.${b.verb}`, { module: M, name: b.name }) : t(`inventory.changelog.message.${b.verb}NoName`, { module: M });
|
|
614
613
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
614
|
+
function D(f) {
|
|
615
|
+
return Qe(f) ? t(f) : f;
|
|
617
616
|
}
|
|
618
|
-
const
|
|
619
|
-
function
|
|
620
|
-
return f == null || b == null ? null :
|
|
617
|
+
const J = (f) => /[^a-zA-Z]/.test(f);
|
|
618
|
+
function R(f, b) {
|
|
619
|
+
return f == null || b == null ? null : tt(f, b);
|
|
621
620
|
}
|
|
622
621
|
function _(f) {
|
|
623
622
|
if (!(!f.to_value && !f.from_value))
|
|
624
623
|
return {
|
|
625
|
-
toTree: f.to_value ?
|
|
626
|
-
fromTree: f.from_value ?
|
|
624
|
+
toTree: f.to_value ? Fe(f.to_value, t, 0, e.resolveName) : void 0,
|
|
625
|
+
fromTree: f.from_value ? Fe(f.from_value, t, 0, e.resolveName) : void 0
|
|
627
626
|
};
|
|
628
627
|
}
|
|
629
628
|
function w(f) {
|
|
630
629
|
return f === "add" ? "bg-green-50 text-green-700" : f === "del" ? "bg-red-50 text-red-700" : f === "skip" ? "text-gray-400" : "text-gray-600";
|
|
631
630
|
}
|
|
632
|
-
function
|
|
631
|
+
function E(f) {
|
|
633
632
|
return f.type === "skip" ? f.text : (f.type === "add" ? "+ " : f.type === "del" ? "- " : " ") + f.text;
|
|
634
633
|
}
|
|
635
|
-
const K =
|
|
636
|
-
const f = /* @__PURE__ */ new Map(), b = [], M = (
|
|
637
|
-
let
|
|
638
|
-
return
|
|
639
|
-
}, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (
|
|
640
|
-
var
|
|
641
|
-
if (
|
|
642
|
-
let
|
|
634
|
+
const K = F(() => {
|
|
635
|
+
const f = /* @__PURE__ */ new Map(), b = [], M = (y, m) => {
|
|
636
|
+
let B = f.get(y);
|
|
637
|
+
return B || (B = m(), f.set(y, B), b.push(B)), B;
|
|
638
|
+
}, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (y, m) => {
|
|
639
|
+
var T;
|
|
640
|
+
if (y == null) return m;
|
|
641
|
+
let B;
|
|
643
642
|
try {
|
|
644
|
-
|
|
643
|
+
B = JSON.parse(y);
|
|
645
644
|
} catch {
|
|
646
|
-
|
|
645
|
+
B = y;
|
|
647
646
|
}
|
|
648
|
-
return (typeof
|
|
649
|
-
},
|
|
650
|
-
var
|
|
647
|
+
return (typeof B == "string" ? (T = e.resolveName) == null ? void 0 : T.call(e, B) : void 0) ?? m;
|
|
648
|
+
}, Y = (y, m, B) => {
|
|
649
|
+
var T, W, ee, ne;
|
|
651
650
|
const x = _(m);
|
|
652
|
-
x ?
|
|
653
|
-
label:
|
|
651
|
+
x ? y.lines.push({ label: B, ...x }) : m.from != null && m.to != null ? y.lines.push({
|
|
652
|
+
label: B,
|
|
654
653
|
from: m.from,
|
|
655
654
|
to: m.to,
|
|
656
|
-
diff:
|
|
657
|
-
fromDisplay: X(m.from, (
|
|
655
|
+
diff: R(m.from, m.to),
|
|
656
|
+
fromDisplay: X(m.from, (T = m.display) == null ? void 0 : T.from),
|
|
658
657
|
toDisplay: X(m.to, (W = m.display) == null ? void 0 : W.to)
|
|
659
|
-
}) : m.to != null ?
|
|
660
|
-
},
|
|
661
|
-
var
|
|
662
|
-
const m =
|
|
658
|
+
}) : m.to != null ? y.lines.push({ label: B, to: m.to, toDisplay: X(m.to, (ee = m.display) == null ? void 0 : ee.to) }) : y.lines.push({ label: B, from: m.from, fromDisplay: X(m.from, (ne = m.display) == null ? void 0 : ne.from) });
|
|
659
|
+
}, V = (y) => {
|
|
660
|
+
var B;
|
|
661
|
+
const m = y.element;
|
|
663
662
|
if (m) {
|
|
664
663
|
const x = M(`kit:${(m.trail ?? []).join(".")}:${m.id ?? ""}`, () => ({
|
|
665
|
-
kind: (m.trail ?? []).map(
|
|
664
|
+
kind: (m.trail ?? []).map(D).join(" › "),
|
|
666
665
|
header: m.name || m.id || "",
|
|
667
666
|
lines: []
|
|
668
667
|
}));
|
|
669
|
-
if ((
|
|
670
|
-
|
|
668
|
+
if ((B = y.field) != null && B.length)
|
|
669
|
+
Y(x, y, y.field.map(D).join(" › "));
|
|
671
670
|
else {
|
|
672
|
-
x.badge =
|
|
673
|
-
const
|
|
674
|
-
|
|
671
|
+
x.badge = y.to != null ? "added" : "removed";
|
|
672
|
+
const T = _(y);
|
|
673
|
+
T && x.lines.push(T);
|
|
675
674
|
}
|
|
676
675
|
return;
|
|
677
676
|
}
|
|
678
|
-
|
|
677
|
+
Y(A(), y, (y.field ?? []).map(D).join(" › "));
|
|
679
678
|
};
|
|
680
|
-
for (const
|
|
681
|
-
const { raw: m, human:
|
|
682
|
-
if (
|
|
683
|
-
const ee = _(
|
|
679
|
+
for (const y of r.value) {
|
|
680
|
+
const { raw: m, human: B } = Ve(y.path);
|
|
681
|
+
if (y.kind === "create" && !m) {
|
|
682
|
+
const ee = _(y);
|
|
684
683
|
A().lines.push(
|
|
685
684
|
ee ? { label: t("inventory.changelog.kind.created"), ...ee } : { text: t("inventory.changelog.kind.created") }
|
|
686
685
|
);
|
|
687
686
|
continue;
|
|
688
687
|
}
|
|
689
|
-
if (!
|
|
690
|
-
|
|
688
|
+
if (!y.path.includes(et) && (y.field || y.element)) {
|
|
689
|
+
V(y);
|
|
691
690
|
continue;
|
|
692
691
|
}
|
|
693
|
-
const x = m ? m.split(".") : [],
|
|
694
|
-
if (W > 0 &&
|
|
695
|
-
const ee =
|
|
696
|
-
kind:
|
|
692
|
+
const x = m ? m.split(".") : [], T = B ? B.split(" › ") : [], W = x.findIndex((ee, ne) => ne > 0 && J(ee));
|
|
693
|
+
if (W > 0 && T.length === x.length) {
|
|
694
|
+
const ee = T[W], ne = M(x.slice(0, W + 1).join("."), () => ({
|
|
695
|
+
kind: T.slice(0, W).map(D).join(" › "),
|
|
697
696
|
header: ee,
|
|
698
697
|
lines: []
|
|
699
|
-
})),
|
|
700
|
-
if (
|
|
701
|
-
else if (
|
|
698
|
+
})), ie = T.slice(W + 1).map(D).join(" › ");
|
|
699
|
+
if (ie) Y(ne, y, ie);
|
|
700
|
+
else if (y.from != null && y.to != null) Y(ne, y, ee);
|
|
702
701
|
else {
|
|
703
|
-
|
|
704
|
-
const de = _(
|
|
705
|
-
de &&
|
|
702
|
+
ne.badge = y.to != null ? "added" : "removed";
|
|
703
|
+
const de = _(y);
|
|
704
|
+
de && ne.lines.push(de);
|
|
706
705
|
}
|
|
707
706
|
continue;
|
|
708
707
|
}
|
|
709
|
-
|
|
708
|
+
Y(A(), y, T.map(D).join(" › "));
|
|
710
709
|
}
|
|
711
710
|
return b;
|
|
712
711
|
});
|
|
713
712
|
return (f, b) => {
|
|
714
|
-
var X,
|
|
715
|
-
const M =
|
|
713
|
+
var X, Y;
|
|
714
|
+
const M = z("FmCircularProgress"), A = z("FmSwitch");
|
|
716
715
|
return f.isLoading ? (i(), c("div", yn, [
|
|
717
|
-
|
|
716
|
+
C(M)
|
|
718
717
|
])) : f.commits.length ? (i(), c("div", _n, [
|
|
719
|
-
|
|
720
|
-
(i(!0), c(
|
|
721
|
-
key:
|
|
718
|
+
g("ol", bn, [
|
|
719
|
+
(i(!0), c(H, null, ae(f.commits, (V) => (i(), c("li", {
|
|
720
|
+
key: V.id,
|
|
722
721
|
role: "button",
|
|
723
722
|
tabindex: "0",
|
|
724
|
-
class:
|
|
723
|
+
class: le([
|
|
725
724
|
"cursor-pointer border-l-2 py-8 pl-12",
|
|
726
|
-
|
|
725
|
+
V.id === s.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
|
|
727
726
|
]),
|
|
728
|
-
onClick: (
|
|
727
|
+
onClick: (y) => s.value = V.id,
|
|
729
728
|
onKeydown: [
|
|
730
|
-
|
|
731
|
-
|
|
729
|
+
Me((y) => s.value = V.id, ["enter"]),
|
|
730
|
+
Me(vt((y) => s.value = V.id, ["prevent"]), ["space"])
|
|
732
731
|
]
|
|
733
732
|
}, [
|
|
734
|
-
|
|
735
|
-
|
|
733
|
+
g("div", wn, h(O(V)), 1),
|
|
734
|
+
g("div", kn, h(Q(V)) + " · " + h(P(V.at)) + " · " + h(I(V.id)), 1)
|
|
736
735
|
], 42, xn))), 128))
|
|
737
736
|
]),
|
|
738
737
|
a.value ? (i(), c("div", Sn, [
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
a.value.parent ? N("", !0) : (i(), c("span",
|
|
738
|
+
g("div", $n, [
|
|
739
|
+
g("div", Cn, [
|
|
740
|
+
g("div", Ln, h(O(a.value)), 1),
|
|
741
|
+
a.value.parent ? N("", !0) : (i(), c("span", Dn, h($(t)("inventory.changelog.rootCommit")), 1))
|
|
743
742
|
]),
|
|
744
|
-
|
|
743
|
+
g("div", Rn, h(Q(a.value)) + " · " + h(P(a.value.at)), 1)
|
|
745
744
|
]),
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
default:
|
|
749
|
-
|
|
750
|
-
|
|
745
|
+
g("div", Vn, [
|
|
746
|
+
C(Xe, null, {
|
|
747
|
+
default: te(() => [
|
|
748
|
+
g("span", Fn, h($(t)("inventory.changelog.dataDiff")), 1),
|
|
749
|
+
C(A, {
|
|
751
750
|
modelValue: u.value,
|
|
752
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
751
|
+
"onUpdate:modelValue": b[0] || (b[0] = (V) => u.value = V)
|
|
753
752
|
}, null, 8, ["modelValue"])
|
|
754
753
|
]),
|
|
755
754
|
_: 1
|
|
756
755
|
})
|
|
757
756
|
]),
|
|
758
|
-
u.value ? (i(), c("div",
|
|
759
|
-
$(v) ? (i(),
|
|
760
|
-
(i(!0), c(
|
|
761
|
-
key:
|
|
762
|
-
class:
|
|
763
|
-
},
|
|
757
|
+
u.value ? (i(), c("div", In, [
|
|
758
|
+
$(v) ? (i(), ce(M, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), c("div", Nn, h($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (Y = $(p)) != null && Y.diff ? (i(), c("div", Pn, [
|
|
759
|
+
(i(!0), c(H, null, ae($(p).diff, (V, y) => (i(), c("div", {
|
|
760
|
+
key: y,
|
|
761
|
+
class: le(["whitespace-pre px-4", w(V.type)])
|
|
762
|
+
}, h(E(V)), 3))), 128))
|
|
764
763
|
])) : N("", !0)
|
|
765
764
|
])) : N("", !0),
|
|
766
|
-
(i(!0), c(
|
|
767
|
-
key:
|
|
765
|
+
(i(!0), c(H, null, ae(K.value, (V, y) => (i(), c("div", {
|
|
766
|
+
key: y,
|
|
768
767
|
class: "mb-12 rounded-lg border border-gray-200 p-12"
|
|
769
768
|
}, [
|
|
770
|
-
|
|
769
|
+
V.kind || V.header || V.badge ? (i(), c("div", {
|
|
771
770
|
key: 0,
|
|
772
|
-
class:
|
|
771
|
+
class: le(["flex flex-wrap items-baseline gap-8", V.lines.length ? "mb-8" : ""])
|
|
773
772
|
}, [
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
773
|
+
V.kind ? (i(), c("span", Bn, h(V.kind), 1)) : N("", !0),
|
|
774
|
+
g("span", En, h(V.header), 1),
|
|
775
|
+
V.badge ? (i(), c("span", {
|
|
777
776
|
key: 1,
|
|
778
|
-
class:
|
|
779
|
-
},
|
|
777
|
+
class: le(["rounded-full px-8 text-xs", V.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
|
|
778
|
+
}, h(V.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : N("", !0)
|
|
780
779
|
], 2)) : N("", !0),
|
|
781
|
-
|
|
782
|
-
(i(!0), c(
|
|
783
|
-
key:
|
|
780
|
+
g("ul", Tn, [
|
|
781
|
+
(i(!0), c(H, null, ae(V.lines, (m, B) => (i(), c("li", {
|
|
782
|
+
key: B,
|
|
784
783
|
class: "flex flex-wrap items-baseline gap-8 text-sm"
|
|
785
784
|
}, [
|
|
786
|
-
m.text ? (i(), c("span",
|
|
787
|
-
|
|
785
|
+
m.text ? (i(), c("span", Un, h(m.text), 1)) : (i(), c(H, { key: 1 }, [
|
|
786
|
+
g("span", An, h(m.label), 1),
|
|
788
787
|
m.toTree || m.fromTree ? (i(), c("div", Mn, [
|
|
789
788
|
m.fromTree ? (i(), c("div", On, [
|
|
790
|
-
(i(!0), c(
|
|
791
|
-
key:
|
|
792
|
-
class:
|
|
789
|
+
(i(!0), c(H, null, ae(m.fromTree, (x, T) => (i(), c("div", {
|
|
790
|
+
key: T,
|
|
791
|
+
class: le(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
|
|
793
792
|
}, [
|
|
794
|
-
(i(!0), c(
|
|
793
|
+
(i(!0), c(H, null, ae(x.depth, (W) => (i(), c("span", {
|
|
795
794
|
key: W,
|
|
796
795
|
class: "inline-block w-16"
|
|
797
796
|
}))), 128)),
|
|
798
797
|
x.label ? (i(), c("span", Kn, [
|
|
799
|
-
|
|
800
|
-
x.text ? (i(), c(
|
|
801
|
-
|
|
798
|
+
ue(h(x.label), 1),
|
|
799
|
+
x.text ? (i(), c(H, { key: 0 }, [
|
|
800
|
+
ue(":")
|
|
802
801
|
], 64)) : N("", !0)
|
|
803
802
|
])) : N("", !0),
|
|
804
|
-
x.text ? (i(), c("span",
|
|
803
|
+
x.text ? (i(), c("span", zn, h(x.text), 1)) : N("", !0)
|
|
805
804
|
], 2))), 128))
|
|
806
805
|
])) : N("", !0),
|
|
807
|
-
m.toTree ? (i(), c("div",
|
|
808
|
-
(i(!0), c(
|
|
809
|
-
key:
|
|
810
|
-
class:
|
|
806
|
+
m.toTree ? (i(), c("div", jn, [
|
|
807
|
+
(i(!0), c(H, null, ae(m.toTree, (x, T) => (i(), c("div", {
|
|
808
|
+
key: T,
|
|
809
|
+
class: le(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
|
|
811
810
|
}, [
|
|
812
|
-
(i(!0), c(
|
|
811
|
+
(i(!0), c(H, null, ae(x.depth, (W) => (i(), c("span", {
|
|
813
812
|
key: W,
|
|
814
813
|
class: "inline-block w-16"
|
|
815
814
|
}))), 128)),
|
|
816
|
-
x.label ? (i(), c("span",
|
|
817
|
-
|
|
818
|
-
x.text ? (i(), c(
|
|
819
|
-
|
|
815
|
+
x.label ? (i(), c("span", Gn, [
|
|
816
|
+
ue(h(x.label), 1),
|
|
817
|
+
x.text ? (i(), c(H, { key: 0 }, [
|
|
818
|
+
ue(":")
|
|
820
819
|
], 64)) : N("", !0)
|
|
821
820
|
])) : N("", !0),
|
|
822
|
-
x.text ? (i(), c("span", Hn,
|
|
821
|
+
x.text ? (i(), c("span", Hn, h(x.text), 1)) : N("", !0)
|
|
823
822
|
], 2))), 128))
|
|
824
823
|
])) : N("", !0)
|
|
825
824
|
])) : m.diff ? (i(), c("div", Jn, [
|
|
826
|
-
(i(!0), c(
|
|
827
|
-
key:
|
|
828
|
-
class:
|
|
829
|
-
},
|
|
825
|
+
(i(!0), c(H, null, ae(m.diff, (x, T) => (i(), c("div", {
|
|
826
|
+
key: T,
|
|
827
|
+
class: le(["whitespace-pre px-4", w(x.type)])
|
|
828
|
+
}, h(E(x)), 3))), 128))
|
|
830
829
|
])) : (i(), c("span", Yn, [
|
|
831
|
-
m.from != null ? (i(), c("span", Wn,
|
|
830
|
+
m.from != null ? (i(), c("span", Wn, h(m.fromDisplay ?? U(m.from)), 1)) : N("", !0),
|
|
832
831
|
m.from != null && m.to != null ? (i(), c("span", Xn, "→")) : N("", !0),
|
|
833
|
-
m.to != null ? (i(), c("span", qn,
|
|
832
|
+
m.to != null ? (i(), c("span", qn, h(m.toDisplay ?? U(m.to)), 1)) : N("", !0)
|
|
834
833
|
]))
|
|
835
834
|
], 64))
|
|
836
835
|
]))), 128))
|
|
837
836
|
])
|
|
838
837
|
]))), 128)),
|
|
839
|
-
K.value.length ? N("", !0) : (i(), c("div", Zn,
|
|
838
|
+
K.value.length ? N("", !0) : (i(), c("div", Zn, h($(t)("inventory.changelog.empty")), 1)),
|
|
840
839
|
u.value ? (i(), c("div", Qn, [
|
|
841
|
-
|
|
842
|
-
a.value.parent ? (i(), c("span", eo, "← " +
|
|
840
|
+
ue(h(a.value.id) + " ", 1),
|
|
841
|
+
a.value.parent ? (i(), c("span", eo, "← " + h(a.value.parent), 1)) : N("", !0)
|
|
843
842
|
])) : N("", !0)
|
|
844
843
|
])) : N("", !0)
|
|
845
|
-
])) : (i(), c("div", hn,
|
|
844
|
+
])) : (i(), c("div", hn, h($(t)("inventory.changelog.empty")), 1));
|
|
846
845
|
};
|
|
847
846
|
}
|
|
848
|
-
}), oo = { class: "flex flex-col gap-8" }, ao = { class: "flex flex-wrap items-center gap-16" },
|
|
847
|
+
}), oo = { class: "flex flex-col gap-8" }, ao = { class: "flex flex-wrap items-center gap-16" }, lo = { class: "fm-typo-en-heading-lg-600" }, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, io = { class: "flex flex-wrap items-center gap-12" }, uo = { class: "flex shrink-0 items-center gap-8" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fo = { class: "flex flex-wrap items-center gap-12" }, mo = {
|
|
849
848
|
key: 0,
|
|
850
849
|
class: "fm-typo-en-body-md-600"
|
|
851
850
|
}, po = { class: "fm-typo-en-heading-md-600" }, vo = {
|
|
852
851
|
key: 0,
|
|
853
852
|
class: "flex justify-center py-8"
|
|
854
|
-
}, Ce = "inventory.changelog.label.", go = /* @__PURE__ */
|
|
853
|
+
}, Ce = "inventory.changelog.label.", go = /* @__PURE__ */ re({
|
|
855
854
|
__name: "ChangelogDialog",
|
|
856
855
|
props: {
|
|
857
856
|
modelValue: { type: Boolean }
|
|
858
857
|
},
|
|
859
858
|
emits: ["update:modelValue"],
|
|
860
859
|
setup(o, { emit: e }) {
|
|
861
|
-
const t = o,
|
|
860
|
+
const t = o, s = e, a = F({
|
|
862
861
|
get: () => t.modelValue,
|
|
863
|
-
set: (n) =>
|
|
864
|
-
}), { t:
|
|
865
|
-
function
|
|
866
|
-
|
|
862
|
+
set: (n) => s("update:modelValue", n)
|
|
863
|
+
}), { t: l } = he(), r = ge(), u = Ye(), v = Je(), p = _e(), { breakpoints: L } = Vt(), I = F(() => L.value.xs || L.value.sm), P = F(() => I.value ? "98vw" : "72vw"), { commits: U, isLoading: Q, hasMore: O, load: D, loadMore: J } = ln();
|
|
864
|
+
function R() {
|
|
865
|
+
J().catch((n) => console.error("changelog load more failed", n));
|
|
867
866
|
}
|
|
868
867
|
function _(n) {
|
|
869
868
|
return n ? new Date(n).toLocaleString() : "—";
|
|
@@ -871,8 +870,8 @@ const yn = {
|
|
|
871
870
|
function w(n) {
|
|
872
871
|
return [...n].sort((d, S) => (S.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
|
|
873
872
|
}
|
|
874
|
-
function
|
|
875
|
-
|
|
873
|
+
function E(n, d, S) {
|
|
874
|
+
D(n, d, S).catch((j) => console.error("changelog load failed", j));
|
|
876
875
|
}
|
|
877
876
|
const K = k([]);
|
|
878
877
|
async function f() {
|
|
@@ -885,104 +884,104 @@ const yn = {
|
|
|
885
884
|
console.error("changelog domain list load failed", S), K.value = [];
|
|
886
885
|
}
|
|
887
886
|
}
|
|
888
|
-
const b =
|
|
889
|
-
{ label:
|
|
890
|
-
{ label:
|
|
891
|
-
{ label:
|
|
892
|
-
...K.value.map((n) => ({ label:
|
|
893
|
-
]), M = k(b.value[0]), A =
|
|
887
|
+
const b = F(() => [
|
|
888
|
+
{ label: l("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
|
|
889
|
+
{ label: l("inventory.changelog.label.closingDraft"), value: "closingDraft" },
|
|
890
|
+
{ label: l("inventory.changelog.domainInventory"), value: "inventory" },
|
|
891
|
+
...K.value.map((n) => ({ label: l(n.labelKey), value: n.domain }))
|
|
892
|
+
]), M = k(b.value[0]), A = F(() => {
|
|
894
893
|
var n;
|
|
895
894
|
return ((n = M.value) == null ? void 0 : n.value) ?? "purchaseOrder";
|
|
896
|
-
}), X =
|
|
895
|
+
}), X = F(
|
|
897
896
|
() => K.value.some((n) => n.domain === A.value)
|
|
898
|
-
),
|
|
897
|
+
), Y = k(!1), V = F(
|
|
899
898
|
() => ["sku", "recipe", "unit"].map((n) => ({
|
|
900
|
-
label:
|
|
899
|
+
label: l(Ce + n),
|
|
901
900
|
value: n
|
|
902
901
|
}))
|
|
903
|
-
),
|
|
902
|
+
), y = k(V.value[0]), m = F(() => {
|
|
904
903
|
var n;
|
|
905
|
-
return ((n =
|
|
906
|
-
}),
|
|
904
|
+
return ((n = y.value) == null ? void 0 : n.value) ?? "sku";
|
|
905
|
+
}), B = k(""), x = k(null), T = k(!1), W = F(() => {
|
|
907
906
|
var S;
|
|
908
907
|
const n = (S = r.currentBusiness.value) == null ? void 0 : S._id, d = u.inventory._id;
|
|
909
908
|
return n && d ? `business_${n}/${d}` : "";
|
|
910
|
-
}), ee =
|
|
909
|
+
}), ee = F(() => {
|
|
911
910
|
const n = /* @__PURE__ */ new Map(), d = u.inventory;
|
|
912
|
-
for (const S of [d.sku, d.recipe, d.unit
|
|
913
|
-
for (const
|
|
914
|
-
|
|
911
|
+
for (const S of [d.sku, d.recipe, d.unit])
|
|
912
|
+
for (const j of S ?? [])
|
|
913
|
+
j._id && j.name && n.set(j._id, j.name);
|
|
915
914
|
for (const S of d.unit ?? [])
|
|
916
|
-
for (const
|
|
917
|
-
if (!
|
|
918
|
-
const q =
|
|
915
|
+
for (const j of S.measurements ?? []) {
|
|
916
|
+
if (!j.id) continue;
|
|
917
|
+
const q = j.abbrev || j.name;
|
|
919
918
|
if (!q) continue;
|
|
920
|
-
const
|
|
921
|
-
n.set(
|
|
919
|
+
const oe = Nt.toDouble(j.conversion);
|
|
920
|
+
n.set(j.id, oe ? `${q} (1 ${q} = ${oe} ${S.abbrev})` : q);
|
|
922
921
|
}
|
|
923
922
|
return n;
|
|
924
|
-
}),
|
|
925
|
-
async function
|
|
923
|
+
}), ne = (n) => ee.value.get(n), ie = k([]), de = k(!1);
|
|
924
|
+
async function Pe() {
|
|
926
925
|
var d;
|
|
927
926
|
const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
|
|
928
927
|
if (n) {
|
|
929
928
|
de.value = !0;
|
|
930
929
|
try {
|
|
931
|
-
|
|
930
|
+
ie.value = w(
|
|
932
931
|
await p.listInventory(n, m.value)
|
|
933
932
|
);
|
|
934
933
|
} catch (S) {
|
|
935
|
-
console.error("changelog inventory list load failed", S),
|
|
934
|
+
console.error("changelog inventory list load failed", S), ie.value = [];
|
|
936
935
|
} finally {
|
|
937
936
|
de.value = !1;
|
|
938
937
|
}
|
|
939
938
|
}
|
|
940
939
|
}
|
|
941
|
-
const
|
|
942
|
-
() =>
|
|
943
|
-
),
|
|
944
|
-
{ accessorKey: "id", header: () =>
|
|
940
|
+
const nt = F(
|
|
941
|
+
() => T.value ? ie.value : ie.value.filter((n) => !n.deleted)
|
|
942
|
+
), ot = F(() => [
|
|
943
|
+
{ accessorKey: "id", header: () => l("inventory.closing.draft.table.id"), size: 320 },
|
|
945
944
|
{
|
|
946
945
|
id: "name",
|
|
947
|
-
header: () =>
|
|
946
|
+
header: () => l("inventory.common.name"),
|
|
948
947
|
accessorFn: (n) => n.name,
|
|
949
948
|
// Deleted records sit in the same list as live ones, so the row says which
|
|
950
949
|
// it is; nothing else distinguishes them.
|
|
951
|
-
cell: ({ row: n }) => n.original.deleted ?
|
|
950
|
+
cell: ({ row: n }) => n.original.deleted ? gt(
|
|
952
951
|
"span",
|
|
953
952
|
{ "data-deleted": "" },
|
|
954
|
-
`${n.original.name} (${
|
|
953
|
+
`${n.original.name} (${l("inventory.changelog.deleted")})`
|
|
955
954
|
) : n.original.name
|
|
956
955
|
},
|
|
957
956
|
{
|
|
958
957
|
id: "lastUpdate",
|
|
959
|
-
header: () =>
|
|
958
|
+
header: () => l("inventory.changelog.column.lastUpdate"),
|
|
960
959
|
size: 200,
|
|
961
960
|
// Raw ISO is the sort key — clicking the header on formatted dates would
|
|
962
961
|
// order them lexicographically by locale string. Formatted only to display.
|
|
963
962
|
accessorFn: (n) => n.lastUpdate ?? "",
|
|
964
963
|
cell: ({ getValue: n }) => _(n() || void 0)
|
|
965
964
|
}
|
|
966
|
-
]), { commits:
|
|
967
|
-
function
|
|
968
|
-
x.value = n,
|
|
965
|
+
]), { commits: at, load: lt } = rn();
|
|
966
|
+
function st(n) {
|
|
967
|
+
x.value = n, Y.value = !0, E(W.value, qe, Re), n.id && lt(`${W.value}/${m.value}/${n.id}`).catch(
|
|
969
968
|
(d) => console.error("changelog per-entity load failed", d)
|
|
970
969
|
);
|
|
971
970
|
}
|
|
972
|
-
function
|
|
973
|
-
const S =
|
|
974
|
-
return S && S.labelKey === Ce + m.value && S.name === d.name ? !0 : (n.changes ?? []).some((
|
|
975
|
-
const q = dn(
|
|
971
|
+
function rt(n, d) {
|
|
972
|
+
const S = Ze(n.message);
|
|
973
|
+
return S && S.labelKey === Ce + m.value && S.name === d.name ? !0 : (n.changes ?? []).some((j) => {
|
|
974
|
+
const q = dn(j.path);
|
|
976
975
|
return q.type === Ce + m.value && q.name === d.name;
|
|
977
976
|
});
|
|
978
977
|
}
|
|
979
|
-
const
|
|
978
|
+
const it = F(() => {
|
|
980
979
|
const n = x.value;
|
|
981
980
|
if (!n) return [];
|
|
982
|
-
const d =
|
|
983
|
-
return
|
|
981
|
+
const d = U.value.filter((S) => rt(S, n));
|
|
982
|
+
return sn(d, at.value);
|
|
984
983
|
}), be = k([]), xe = k(!1), we = k(null);
|
|
985
|
-
async function
|
|
984
|
+
async function ut() {
|
|
986
985
|
var d;
|
|
987
986
|
const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
|
|
988
987
|
if (n) {
|
|
@@ -998,35 +997,35 @@ const yn = {
|
|
|
998
997
|
}
|
|
999
998
|
}
|
|
1000
999
|
}
|
|
1001
|
-
function
|
|
1000
|
+
function ct(n) {
|
|
1002
1001
|
var S;
|
|
1003
1002
|
const d = (S = r.currentBusiness.value) == null ? void 0 : S._id;
|
|
1004
|
-
d && (we.value = n,
|
|
1003
|
+
d && (we.value = n, Y.value = !0, E(`business_${d}/${n.id}`, void 0, De));
|
|
1005
1004
|
}
|
|
1006
|
-
const ve = k(
|
|
1005
|
+
const ve = k(Ft()), ye = k([]), ke = k(!1), fe = k(null), Be = F(() => {
|
|
1007
1006
|
const n = v._currentLocation;
|
|
1008
1007
|
return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
|
|
1009
|
-
}),
|
|
1010
|
-
{ accessorKey: "id", header: () =>
|
|
1008
|
+
}), Ee = F(() => [
|
|
1009
|
+
{ accessorKey: "id", header: () => l("inventory.closing.draft.table.id"), size: 320 },
|
|
1011
1010
|
{
|
|
1012
1011
|
accessorKey: "name",
|
|
1013
|
-
header: () => A.value === "purchaseOrder" ?
|
|
1012
|
+
header: () => A.value === "purchaseOrder" ? l("inventory.changelog.column.seq") : l("inventory.common.name"),
|
|
1014
1013
|
size: 240
|
|
1015
1014
|
},
|
|
1016
1015
|
{
|
|
1017
1016
|
id: "lastUpdate",
|
|
1018
|
-
header: () =>
|
|
1017
|
+
header: () => l("inventory.changelog.column.lastUpdate"),
|
|
1019
1018
|
size: 200,
|
|
1020
1019
|
// Raw ISO is the sort key; see the note on the inventory table.
|
|
1021
1020
|
accessorFn: (n) => n.lastUpdate ?? "",
|
|
1022
1021
|
cell: ({ getValue: n }) => _(n() || void 0)
|
|
1023
1022
|
}
|
|
1024
1023
|
]);
|
|
1025
|
-
async function
|
|
1026
|
-
var
|
|
1027
|
-
const n = (
|
|
1024
|
+
async function Te() {
|
|
1025
|
+
var j;
|
|
1026
|
+
const n = (j = v._currentLocation) == null ? void 0 : j.dbName;
|
|
1028
1027
|
if (!n) return;
|
|
1029
|
-
const d = Pt(new Date(ve.value.startDate)).toISOString(), S =
|
|
1028
|
+
const d = Pt(new Date(ve.value.startDate)).toISOString(), S = Bt(new Date(ve.value.endDate)).toISOString();
|
|
1030
1029
|
ke.value = !0;
|
|
1031
1030
|
try {
|
|
1032
1031
|
ye.value = w(
|
|
@@ -1038,45 +1037,45 @@ const yn = {
|
|
|
1038
1037
|
ke.value = !1;
|
|
1039
1038
|
}
|
|
1040
1039
|
fe.value && !ye.value.find((q) => {
|
|
1041
|
-
var
|
|
1042
|
-
return q.id === ((
|
|
1043
|
-
}) && (fe.value = null,
|
|
1040
|
+
var oe;
|
|
1041
|
+
return q.id === ((oe = fe.value) == null ? void 0 : oe.id);
|
|
1042
|
+
}) && (fe.value = null, E(""));
|
|
1044
1043
|
}
|
|
1045
|
-
function
|
|
1046
|
-
fe.value = n,
|
|
1044
|
+
function dt(n) {
|
|
1045
|
+
fe.value = n, Y.value = !0, E(`${v.currentLocationDBName}/${n.id}`, void 0, De);
|
|
1047
1046
|
}
|
|
1048
|
-
const
|
|
1047
|
+
const ft = F(() => {
|
|
1049
1048
|
var n, d, S;
|
|
1050
1049
|
return A.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((S = fe.value) == null ? void 0 : S.name) ?? "";
|
|
1051
1050
|
});
|
|
1052
|
-
function
|
|
1053
|
-
|
|
1051
|
+
function Ue() {
|
|
1052
|
+
Y.value = !1, A.value === "inventory" ? (x.value = null, T.value = !1, E(""), Pe().catch(
|
|
1054
1053
|
(n) => console.error("changelog inventory list failed", n)
|
|
1055
|
-
)) : X.value ? (we.value = null,
|
|
1054
|
+
)) : X.value ? (we.value = null, E(""), ut().catch(
|
|
1056
1055
|
(n) => console.error("changelog domain records failed", n)
|
|
1057
|
-
)) : (fe.value = null,
|
|
1056
|
+
)) : (fe.value = null, E(""), Te().catch((n) => console.error("changelog location list failed", n)));
|
|
1058
1057
|
}
|
|
1059
1058
|
return Z(a, (n) => {
|
|
1060
|
-
n && (f().catch((d) => console.error("changelog domain list failed", d)),
|
|
1059
|
+
n && (f().catch((d) => console.error("changelog domain list failed", d)), Ue());
|
|
1061
1060
|
}), Z(A, () => {
|
|
1062
|
-
a.value &&
|
|
1061
|
+
a.value && Ue();
|
|
1063
1062
|
}), Z(ve, () => {
|
|
1064
|
-
a.value && A.value !== "inventory" && !X.value &&
|
|
1065
|
-
}), Z(
|
|
1063
|
+
a.value && A.value !== "inventory" && !X.value && Te().catch((n) => console.error("changelog location list failed", n));
|
|
1064
|
+
}), Z(T, (n) => {
|
|
1066
1065
|
var d;
|
|
1067
|
-
!n && ((d = x.value) != null && d.deleted) && (x.value = null,
|
|
1066
|
+
!n && ((d = x.value) != null && d.deleted) && (x.value = null, Y.value = !1);
|
|
1068
1067
|
}), Z(m, () => {
|
|
1069
|
-
x.value = null,
|
|
1068
|
+
x.value = null, Y.value = !1, a.value && A.value === "inventory" && Pe().catch(
|
|
1070
1069
|
(n) => console.error("changelog inventory list failed", n)
|
|
1071
1070
|
);
|
|
1072
1071
|
}), Z(W, (n) => {
|
|
1073
|
-
x.value = null, a.value && A.value === "inventory" &&
|
|
1072
|
+
x.value = null, a.value && A.value === "inventory" && E(n, void 0, Re);
|
|
1074
1073
|
}), (n, d) => {
|
|
1075
|
-
const S =
|
|
1076
|
-
return i(), c(
|
|
1077
|
-
|
|
1074
|
+
const S = z("FmButtonGroup"), j = z("FmSearch"), q = z("FmSwitch"), oe = z("FmTable"), Ae = z("FmDialog"), mt = z("FmButton");
|
|
1075
|
+
return i(), c(H, null, [
|
|
1076
|
+
C(Ae, {
|
|
1078
1077
|
modelValue: a.value,
|
|
1079
|
-
"onUpdate:modelValue": d[8] || (d[8] = (
|
|
1078
|
+
"onUpdate:modelValue": d[8] || (d[8] = (G) => a.value = G),
|
|
1080
1079
|
"close-button": "",
|
|
1081
1080
|
"dismiss-away": "",
|
|
1082
1081
|
"min-width": "98vw",
|
|
@@ -1084,104 +1083,104 @@ const yn = {
|
|
|
1084
1083
|
"max-height": "94vh",
|
|
1085
1084
|
"content-class": "!p-0 h-[86vh]"
|
|
1086
1085
|
}, {
|
|
1087
|
-
"dialog-header":
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1086
|
+
"dialog-header": te(() => [
|
|
1087
|
+
g("div", oo, [
|
|
1088
|
+
g("div", ao, [
|
|
1089
|
+
g("div", lo, h($(l)("inventory.changelog.title")), 1),
|
|
1090
|
+
C(S, {
|
|
1092
1091
|
modelValue: M.value,
|
|
1093
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1092
|
+
"onUpdate:modelValue": d[0] || (d[0] = (G) => M.value = G),
|
|
1094
1093
|
items: b.value
|
|
1095
1094
|
}, null, 8, ["modelValue", "items"])
|
|
1096
1095
|
]),
|
|
1097
|
-
|
|
1096
|
+
g("div", so, h($(l)("inventory.changelog.scopeDescription")), 1)
|
|
1098
1097
|
])
|
|
1099
1098
|
]),
|
|
1100
|
-
default:
|
|
1101
|
-
|
|
1102
|
-
A.value === "inventory" ? (i(), c(
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
modelValue:
|
|
1106
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
1107
|
-
items:
|
|
1099
|
+
default: te(() => [
|
|
1100
|
+
g("div", ro, [
|
|
1101
|
+
A.value === "inventory" ? (i(), c(H, { key: 0 }, [
|
|
1102
|
+
g("div", io, [
|
|
1103
|
+
C(S, {
|
|
1104
|
+
modelValue: y.value,
|
|
1105
|
+
"onUpdate:modelValue": d[1] || (d[1] = (G) => y.value = G),
|
|
1106
|
+
items: V.value
|
|
1108
1107
|
}, null, 8, ["modelValue", "items"]),
|
|
1109
|
-
|
|
1110
|
-
modelValue:
|
|
1111
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
1108
|
+
C(j, {
|
|
1109
|
+
modelValue: B.value,
|
|
1110
|
+
"onUpdate:modelValue": d[2] || (d[2] = (G) => B.value = G),
|
|
1112
1111
|
class: "flex-1",
|
|
1113
|
-
placeholder: $(
|
|
1112
|
+
placeholder: $(l)("inventory.changelog.searchInventory")
|
|
1114
1113
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
modelValue:
|
|
1119
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
1114
|
+
g("div", uo, [
|
|
1115
|
+
g("span", co, h($(l)("inventory.changelog.includeDeleted")), 1),
|
|
1116
|
+
C(q, {
|
|
1117
|
+
modelValue: T.value,
|
|
1118
|
+
"onUpdate:modelValue": d[3] || (d[3] = (G) => T.value = G)
|
|
1120
1119
|
}, null, 8, ["modelValue"])
|
|
1121
1120
|
])
|
|
1122
1121
|
]),
|
|
1123
|
-
|
|
1122
|
+
C(oe, {
|
|
1124
1123
|
class: "min-h-0 flex-1",
|
|
1125
|
-
"row-data":
|
|
1126
|
-
"column-defs":
|
|
1127
|
-
"search-value":
|
|
1124
|
+
"row-data": nt.value,
|
|
1125
|
+
"column-defs": ot.value,
|
|
1126
|
+
"search-value": B.value,
|
|
1128
1127
|
loading: de.value,
|
|
1129
1128
|
"page-size": 20,
|
|
1130
|
-
onRowClick: d[4] || (d[4] = (
|
|
1129
|
+
onRowClick: d[4] || (d[4] = (G) => st(G.original))
|
|
1131
1130
|
}, null, 8, ["row-data", "column-defs", "search-value", "loading"])
|
|
1132
|
-
], 64)) : X.value ? (i(),
|
|
1131
|
+
], 64)) : X.value ? (i(), ce(oe, {
|
|
1133
1132
|
key: 1,
|
|
1134
1133
|
class: "min-h-0 flex-1",
|
|
1135
1134
|
"row-data": be.value,
|
|
1136
|
-
"column-defs":
|
|
1135
|
+
"column-defs": Ee.value,
|
|
1137
1136
|
loading: xe.value,
|
|
1138
1137
|
"page-size": 20,
|
|
1139
|
-
onRowClick: d[5] || (d[5] = (
|
|
1140
|
-
}, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(
|
|
1141
|
-
|
|
1142
|
-
|
|
1138
|
+
onRowClick: d[5] || (d[5] = (G) => ct(G.original))
|
|
1139
|
+
}, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(H, { key: 2 }, [
|
|
1140
|
+
g("div", fo, [
|
|
1141
|
+
C(It, {
|
|
1143
1142
|
modelValue: ve.value,
|
|
1144
|
-
"onUpdate:modelValue": d[6] || (d[6] = (
|
|
1143
|
+
"onUpdate:modelValue": d[6] || (d[6] = (G) => ve.value = G)
|
|
1145
1144
|
}, null, 8, ["modelValue"]),
|
|
1146
|
-
|
|
1145
|
+
Be.value ? (i(), c("span", mo, h(Be.value), 1)) : N("", !0)
|
|
1147
1146
|
]),
|
|
1148
|
-
|
|
1147
|
+
C(oe, {
|
|
1149
1148
|
class: "min-h-0 flex-1",
|
|
1150
1149
|
"row-data": ye.value,
|
|
1151
|
-
"column-defs":
|
|
1150
|
+
"column-defs": Ee.value,
|
|
1152
1151
|
loading: ke.value,
|
|
1153
1152
|
"page-size": 20,
|
|
1154
|
-
onRowClick: d[7] || (d[7] = (
|
|
1153
|
+
onRowClick: d[7] || (d[7] = (G) => dt(G.original))
|
|
1155
1154
|
}, null, 8, ["row-data", "column-defs", "loading"])
|
|
1156
1155
|
], 64))
|
|
1157
1156
|
])
|
|
1158
1157
|
]),
|
|
1159
1158
|
_: 1
|
|
1160
1159
|
}, 8, ["modelValue"]),
|
|
1161
|
-
|
|
1162
|
-
modelValue:
|
|
1163
|
-
"onUpdate:modelValue": d[9] || (d[9] = (
|
|
1160
|
+
C(Ae, {
|
|
1161
|
+
modelValue: Y.value,
|
|
1162
|
+
"onUpdate:modelValue": d[9] || (d[9] = (G) => Y.value = G),
|
|
1164
1163
|
"close-button": "",
|
|
1165
1164
|
"dismiss-away": "",
|
|
1166
1165
|
"min-width": P.value,
|
|
1167
1166
|
"max-width": P.value,
|
|
1168
1167
|
"max-height": "86vh"
|
|
1169
1168
|
}, {
|
|
1170
|
-
"dialog-header":
|
|
1171
|
-
|
|
1169
|
+
"dialog-header": te(() => [
|
|
1170
|
+
g("div", po, h(ft.value), 1)
|
|
1172
1171
|
]),
|
|
1173
|
-
default:
|
|
1174
|
-
|
|
1175
|
-
commits: A.value === "inventory" ?
|
|
1172
|
+
default: te(() => [
|
|
1173
|
+
C(no, {
|
|
1174
|
+
commits: A.value === "inventory" ? it.value : $(U),
|
|
1176
1175
|
"is-loading": $(Q),
|
|
1177
|
-
"resolve-name":
|
|
1176
|
+
"resolve-name": ne
|
|
1178
1177
|
}, null, 8, ["commits", "is-loading"]),
|
|
1179
1178
|
A.value !== "inventory" && $(O) ? (i(), c("div", vo, [
|
|
1180
|
-
|
|
1181
|
-
label: $(
|
|
1179
|
+
C(mt, {
|
|
1180
|
+
label: $(l)("inventory.changelog.loadMore"),
|
|
1182
1181
|
variant: "secondary",
|
|
1183
1182
|
disabled: $(Q),
|
|
1184
|
-
onClick:
|
|
1183
|
+
onClick: R
|
|
1185
1184
|
}, null, 8, ["label", "disabled"])
|
|
1186
1185
|
])) : N("", !0)
|
|
1187
1186
|
]),
|
|
@@ -1190,101 +1189,101 @@ const yn = {
|
|
|
1190
1189
|
], 64);
|
|
1191
1190
|
};
|
|
1192
1191
|
}
|
|
1193
|
-
}), yo = /* @__PURE__ */
|
|
1192
|
+
}), yo = /* @__PURE__ */ Et(go, [["__scopeId", "data-v-07c5a952"]]), se = 8;
|
|
1194
1193
|
function ho(o, e) {
|
|
1195
1194
|
return { x: se, y: Math.max(se, e - o - se) };
|
|
1196
1195
|
}
|
|
1197
|
-
const _o = ["title"],
|
|
1196
|
+
const _o = ["title"], Ge = 48, bo = 8, xo = /* @__PURE__ */ re({
|
|
1198
1197
|
__name: "ChangelogFloatingButton",
|
|
1199
1198
|
setup(o) {
|
|
1200
|
-
const { t: e } = he(), t = ge(),
|
|
1201
|
-
var
|
|
1202
|
-
return !!((
|
|
1203
|
-
}), a = k(!1),
|
|
1199
|
+
const { t: e } = he(), t = ge(), s = F(() => {
|
|
1200
|
+
var R;
|
|
1201
|
+
return !!((R = t.sessionUser.value) != null && R.role.isAdmin);
|
|
1202
|
+
}), a = k(!1), l = k(null);
|
|
1204
1203
|
function r() {
|
|
1205
|
-
var
|
|
1204
|
+
var R, _;
|
|
1206
1205
|
return {
|
|
1207
|
-
width: ((
|
|
1208
|
-
height: ((_ =
|
|
1206
|
+
width: ((R = l.value) == null ? void 0 : R.offsetWidth) ?? Ge,
|
|
1207
|
+
height: ((_ = l.value) == null ? void 0 : _.offsetHeight) ?? Ge
|
|
1209
1208
|
};
|
|
1210
1209
|
}
|
|
1211
1210
|
const u = k({ x: 0, y: 0 });
|
|
1212
|
-
function v(
|
|
1213
|
-
return Math.min(Math.max(
|
|
1211
|
+
function v(R, _, w) {
|
|
1212
|
+
return Math.min(Math.max(R, _), w);
|
|
1214
1213
|
}
|
|
1215
1214
|
function p() {
|
|
1216
|
-
const { width:
|
|
1215
|
+
const { width: R, height: _ } = r(), w = Math.max(se, window.innerWidth - R - se - bo), E = Math.max(se, window.innerHeight - _ - se), K = u.value.x + R / 2;
|
|
1217
1216
|
u.value = {
|
|
1218
1217
|
x: K < window.innerWidth / 2 ? se : w,
|
|
1219
|
-
y: v(u.value.y, se,
|
|
1218
|
+
y: v(u.value.y, se, E)
|
|
1220
1219
|
};
|
|
1221
1220
|
}
|
|
1222
|
-
function
|
|
1221
|
+
function L() {
|
|
1223
1222
|
u.value = ho(r().height, window.innerHeight);
|
|
1224
1223
|
}
|
|
1225
1224
|
Ie(() => {
|
|
1226
|
-
|
|
1227
|
-
}),
|
|
1225
|
+
L(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
|
|
1226
|
+
}), yt(() => {
|
|
1228
1227
|
window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
|
|
1229
|
-
}), Z(
|
|
1230
|
-
|
|
1228
|
+
}), Z(s, async (R) => {
|
|
1229
|
+
R && (await ht(), L());
|
|
1231
1230
|
});
|
|
1232
|
-
const
|
|
1233
|
-
let P = null,
|
|
1234
|
-
function Q(
|
|
1235
|
-
P = { x:
|
|
1231
|
+
const I = k(!1);
|
|
1232
|
+
let P = null, U = !1;
|
|
1233
|
+
function Q(R) {
|
|
1234
|
+
P = { x: R.clientX, y: R.clientY, px: u.value.x, py: u.value.y }, I.value = !0, U = !1, R.currentTarget.setPointerCapture(R.pointerId);
|
|
1236
1235
|
}
|
|
1237
|
-
function O(
|
|
1236
|
+
function O(R) {
|
|
1238
1237
|
if (!P) return;
|
|
1239
|
-
const _ =
|
|
1240
|
-
Math.abs(_) + Math.abs(w) > 3 && (
|
|
1241
|
-
const { width:
|
|
1238
|
+
const _ = R.clientX - P.x, w = R.clientY - P.y;
|
|
1239
|
+
Math.abs(_) + Math.abs(w) > 3 && (U = !0);
|
|
1240
|
+
const { width: E, height: K } = r();
|
|
1242
1241
|
u.value = {
|
|
1243
|
-
x: v(P.px + _, 0, window.innerWidth -
|
|
1242
|
+
x: v(P.px + _, 0, window.innerWidth - E),
|
|
1244
1243
|
y: v(P.py + w, 0, window.innerHeight - K)
|
|
1245
1244
|
};
|
|
1246
1245
|
}
|
|
1247
|
-
function
|
|
1248
|
-
P = null,
|
|
1246
|
+
function D() {
|
|
1247
|
+
P = null, I.value = !1, p();
|
|
1249
1248
|
}
|
|
1250
|
-
function
|
|
1251
|
-
P && (
|
|
1249
|
+
function J() {
|
|
1250
|
+
P && (D(), U || (a.value = !0));
|
|
1252
1251
|
}
|
|
1253
|
-
return (
|
|
1254
|
-
const w =
|
|
1255
|
-
return i(),
|
|
1256
|
-
|
|
1257
|
-
|
|
1252
|
+
return (R, _) => {
|
|
1253
|
+
const w = z("FmIcon");
|
|
1254
|
+
return i(), ce(_t, { to: "body" }, [
|
|
1255
|
+
s.value ? (i(), c(H, { key: 0 }, [
|
|
1256
|
+
g("div", {
|
|
1258
1257
|
ref_key: "wrapperRef",
|
|
1259
|
-
ref:
|
|
1260
|
-
class:
|
|
1261
|
-
style:
|
|
1258
|
+
ref: l,
|
|
1259
|
+
class: le(["fixed z-50 cursor-grab touch-none", I.value ? "" : "transition-[left,top] duration-200 ease-out"]),
|
|
1260
|
+
style: bt({ left: `${u.value.x}px`, top: `${u.value.y}px` })
|
|
1262
1261
|
}, [
|
|
1263
|
-
|
|
1264
|
-
default:
|
|
1265
|
-
|
|
1262
|
+
C(Xe, null, {
|
|
1263
|
+
default: te(() => [
|
|
1264
|
+
g("button", {
|
|
1266
1265
|
type: "button",
|
|
1267
1266
|
title: $(e)("inventory.changelog.title"),
|
|
1268
|
-
class:
|
|
1267
|
+
class: le(["fm-typo-en-body-sm-600 flex h-48 items-center gap-8 whitespace-nowrap rounded-full border border-gray-200 bg-white px-16 shadow-lg hover:bg-gray-50", I.value ? "cursor-grabbing" : "cursor-grab"]),
|
|
1269
1268
|
onPointerdown: Q,
|
|
1270
1269
|
onPointermove: O,
|
|
1271
|
-
onPointerup:
|
|
1272
|
-
onPointercancel:
|
|
1270
|
+
onPointerup: J,
|
|
1271
|
+
onPointercancel: D
|
|
1273
1272
|
}, [
|
|
1274
|
-
|
|
1273
|
+
C(w, {
|
|
1275
1274
|
name: "history",
|
|
1276
1275
|
size: "md",
|
|
1277
1276
|
outline: ""
|
|
1278
1277
|
}),
|
|
1279
|
-
|
|
1278
|
+
g("span", null, h($(e)("inventory.changelog.fabLabel")), 1)
|
|
1280
1279
|
], 42, _o)
|
|
1281
1280
|
]),
|
|
1282
1281
|
_: 1
|
|
1283
1282
|
})
|
|
1284
1283
|
], 6),
|
|
1285
|
-
|
|
1284
|
+
C(yo, {
|
|
1286
1285
|
modelValue: a.value,
|
|
1287
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
1286
|
+
"onUpdate:modelValue": _[0] || (_[0] = (E) => a.value = E)
|
|
1288
1287
|
}, null, 8, ["modelValue"])
|
|
1289
1288
|
], 64)) : N("", !0)
|
|
1290
1289
|
]);
|
|
@@ -1298,9 +1297,9 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
|
|
|
1298
1297
|
href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices",
|
|
1299
1298
|
target: "_blank",
|
|
1300
1299
|
rel: "noopener"
|
|
1301
|
-
},
|
|
1300
|
+
}, Do = /* @__PURE__ */ re({
|
|
1302
1301
|
__name: "PlanUpgradeDialog",
|
|
1303
|
-
props: /* @__PURE__ */
|
|
1302
|
+
props: /* @__PURE__ */ Le({
|
|
1304
1303
|
capability: {},
|
|
1305
1304
|
result: {}
|
|
1306
1305
|
}, {
|
|
@@ -1309,52 +1308,52 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
|
|
|
1309
1308
|
}),
|
|
1310
1309
|
emits: ["update:modelValue"],
|
|
1311
1310
|
setup(o) {
|
|
1312
|
-
const e = o, t =
|
|
1311
|
+
const e = o, t = He(o, "modelValue"), s = F(() => {
|
|
1313
1312
|
var r;
|
|
1314
1313
|
return ((r = e.capability) == null ? void 0 : r.tier) ?? "premium";
|
|
1315
|
-
}), a =
|
|
1314
|
+
}), a = F(() => {
|
|
1316
1315
|
var r;
|
|
1317
1316
|
return ((r = e.result) == null ? void 0 : r.stage) === "off";
|
|
1318
|
-
}),
|
|
1317
|
+
}), l = F(() => a.value ? "Feature unavailable" : `Upgrade to ${s.value} plan`);
|
|
1319
1318
|
return (r, u) => {
|
|
1320
|
-
const v =
|
|
1321
|
-
return i(),
|
|
1319
|
+
const v = z("FmSpacer"), p = z("FmButton"), L = z("FmDialog");
|
|
1320
|
+
return i(), ce(L, {
|
|
1322
1321
|
modelValue: t.value,
|
|
1323
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
1322
|
+
"onUpdate:modelValue": u[1] || (u[1] = (I) => t.value = I),
|
|
1324
1323
|
overlay: !0,
|
|
1325
1324
|
"close-button": "",
|
|
1326
1325
|
dismissAway: "",
|
|
1327
1326
|
"max-width": "520px"
|
|
1328
1327
|
}, {
|
|
1329
|
-
"dialog-header":
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1328
|
+
"dialog-header": te(() => [
|
|
1329
|
+
g("div", wo, [
|
|
1330
|
+
g("span", null, h(l.value), 1),
|
|
1331
|
+
C(Ut, { tier: s.value }, null, 8, ["tier"])
|
|
1333
1332
|
])
|
|
1334
1333
|
]),
|
|
1335
|
-
"dialog-footer":
|
|
1336
|
-
|
|
1337
|
-
|
|
1334
|
+
"dialog-footer": te(() => [
|
|
1335
|
+
C(v, { class: "sm:hidden xs:hidden" }),
|
|
1336
|
+
C(p, {
|
|
1338
1337
|
variant: "tertiary",
|
|
1339
1338
|
label: "Not now",
|
|
1340
|
-
onClick: u[0] || (u[0] = (
|
|
1339
|
+
onClick: u[0] || (u[0] = (I) => t.value = !1)
|
|
1341
1340
|
}),
|
|
1342
1341
|
a.value ? N("", !0) : (i(), c("a", Lo, [
|
|
1343
|
-
|
|
1342
|
+
C(p, { label: "Compare plans" })
|
|
1344
1343
|
]))
|
|
1345
1344
|
]),
|
|
1346
|
-
default:
|
|
1347
|
-
var
|
|
1345
|
+
default: te(() => {
|
|
1346
|
+
var I, P, U;
|
|
1348
1347
|
return [
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
a.value ? (i(), c(
|
|
1352
|
-
|
|
1353
|
-
], 64)) : (i(), c(
|
|
1354
|
-
|
|
1348
|
+
g("div", ko, [
|
|
1349
|
+
g("p", So, [
|
|
1350
|
+
a.value ? (i(), c(H, { key: 0 }, [
|
|
1351
|
+
ue(h((I = r.result) == null ? void 0 : I.reason), 1)
|
|
1352
|
+
], 64)) : (i(), c(H, { key: 1 }, [
|
|
1353
|
+
ue(h((P = r.capability) == null ? void 0 : P.module) + " is available on the " + h(s.value) + " plan. ", 1)
|
|
1355
1354
|
], 64))
|
|
1356
1355
|
]),
|
|
1357
|
-
|
|
1356
|
+
g("p", $o, h((U = r.capability) == null ? void 0 : U.description), 1),
|
|
1358
1357
|
a.value ? N("", !0) : (i(), c("p", Co, " Upgrade your plan to unlock this functionality for your business. "))
|
|
1359
1358
|
])
|
|
1360
1359
|
];
|
|
@@ -1363,19 +1362,71 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
|
|
|
1363
1362
|
}, 8, ["modelValue"]);
|
|
1364
1363
|
};
|
|
1365
1364
|
}
|
|
1366
|
-
}),
|
|
1365
|
+
}), Ro = { class: "flex items-center gap-8" }, Vo = { class: "flex flex-col gap-8 text-fm-color-typo-secondary" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Io = /* @__PURE__ */ re({
|
|
1366
|
+
__name: "DeprecateSoonWarningDialog",
|
|
1367
|
+
props: /* @__PURE__ */ Le({
|
|
1368
|
+
featureName: {}
|
|
1369
|
+
}, {
|
|
1370
|
+
modelValue: { type: Boolean, required: !0 },
|
|
1371
|
+
modelModifiers: {}
|
|
1372
|
+
}),
|
|
1373
|
+
emits: /* @__PURE__ */ Le(["proceed"], ["update:modelValue"]),
|
|
1374
|
+
setup(o, { emit: e }) {
|
|
1375
|
+
const t = He(o, "modelValue"), s = e;
|
|
1376
|
+
function a() {
|
|
1377
|
+
t.value = !1, s("proceed");
|
|
1378
|
+
}
|
|
1379
|
+
return (l, r) => {
|
|
1380
|
+
const u = z("FmSpacer"), v = z("FmButton"), p = z("FmDialog");
|
|
1381
|
+
return i(), ce(p, {
|
|
1382
|
+
modelValue: t.value,
|
|
1383
|
+
"onUpdate:modelValue": r[1] || (r[1] = (L) => t.value = L),
|
|
1384
|
+
overlay: !0,
|
|
1385
|
+
"close-button": "",
|
|
1386
|
+
dismissAway: "",
|
|
1387
|
+
"max-width": "520px"
|
|
1388
|
+
}, {
|
|
1389
|
+
"dialog-header": te(() => [
|
|
1390
|
+
g("div", Ro, [
|
|
1391
|
+
r[2] || (r[2] = g("span", null, "Feature removal notice", -1)),
|
|
1392
|
+
C(At)
|
|
1393
|
+
])
|
|
1394
|
+
]),
|
|
1395
|
+
"dialog-footer": te(() => [
|
|
1396
|
+
C(u, { class: "sm:hidden xs:hidden" }),
|
|
1397
|
+
C(v, {
|
|
1398
|
+
variant: "tertiary",
|
|
1399
|
+
label: "Cancel",
|
|
1400
|
+
onClick: r[0] || (r[0] = (L) => t.value = !1)
|
|
1401
|
+
}),
|
|
1402
|
+
C(v, {
|
|
1403
|
+
label: "Continue",
|
|
1404
|
+
onClick: a
|
|
1405
|
+
})
|
|
1406
|
+
]),
|
|
1407
|
+
default: te(() => [
|
|
1408
|
+
g("div", Vo, [
|
|
1409
|
+
g("p", Fo, h(l.featureName ?? "This feature") + " will be removed in a future release. ", 1),
|
|
1410
|
+
r[3] || (r[3] = g("p", { class: "fm-typo-en-body-sm-400" }, " You can continue to use it for now, but we recommend moving to the supported workflow. ", -1))
|
|
1411
|
+
])
|
|
1412
|
+
]),
|
|
1413
|
+
_: 1
|
|
1414
|
+
}, 8, ["modelValue"]);
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
}), No = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Po = /* @__PURE__ */ re({
|
|
1367
1418
|
__name: "NavigationTab",
|
|
1368
1419
|
setup(o) {
|
|
1369
|
-
const e = $t(), t =
|
|
1420
|
+
const e = $t(), t = Ne(), s = ge(), a = Mt(), l = Tt(), r = k(!1), u = k(null), v = k(null), p = k(!1), L = k(null), I = k(null), P = F(
|
|
1370
1421
|
() => {
|
|
1371
1422
|
var _, w;
|
|
1372
|
-
return (w =
|
|
1423
|
+
return (w = Oe(((_ = L.value) == null ? void 0 : _.featureKey) ?? "")) == null ? void 0 : w.label;
|
|
1373
1424
|
}
|
|
1374
|
-
), { menuItems:
|
|
1375
|
-
Z([() =>
|
|
1376
|
-
(_ == null ? void 0 : _.menuVersion) === "v3" && (w ===
|
|
1425
|
+
), { menuItems: U } = We();
|
|
1426
|
+
Z([() => s.currentBusiness.value, () => e.name], ([_, w]) => {
|
|
1427
|
+
(_ == null ? void 0 : _.menuVersion) === "v3" && (w === pe.INGREDIENTS || w === pe.RECIPE || w === pe.UNIT) && t.push({ name: pe.STOCK });
|
|
1377
1428
|
});
|
|
1378
|
-
const Q =
|
|
1429
|
+
const Q = F({
|
|
1379
1430
|
get() {
|
|
1380
1431
|
if (e.name)
|
|
1381
1432
|
return String(e.name);
|
|
@@ -1383,53 +1434,53 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
|
|
|
1383
1434
|
set(_) {
|
|
1384
1435
|
var f;
|
|
1385
1436
|
if (!_) return;
|
|
1386
|
-
const w = String(_),
|
|
1387
|
-
if ((f =
|
|
1388
|
-
|
|
1437
|
+
const w = String(_), E = Dt.find((b) => b.route === w), K = Rt(w, a.value);
|
|
1438
|
+
if ((f = Oe((E == null ? void 0 : E.featureKey) ?? "")) != null && f.deprecateSoon) {
|
|
1439
|
+
L.value = E ?? null, I.value = w, p.value = !0;
|
|
1389
1440
|
return;
|
|
1390
1441
|
}
|
|
1391
|
-
if (
|
|
1392
|
-
u.value =
|
|
1442
|
+
if (E && K.disabled) {
|
|
1443
|
+
u.value = E, v.value = K, r.value = !0;
|
|
1393
1444
|
return;
|
|
1394
1445
|
}
|
|
1395
1446
|
t.push({ name: w });
|
|
1396
1447
|
}
|
|
1397
1448
|
});
|
|
1398
1449
|
function O() {
|
|
1399
|
-
|
|
1450
|
+
I.value && (t.push({ name: I.value }), I.value = null);
|
|
1400
1451
|
}
|
|
1401
|
-
const
|
|
1452
|
+
const D = F(
|
|
1402
1453
|
() => {
|
|
1403
1454
|
var _;
|
|
1404
|
-
return `NavigationTab.${(_ =
|
|
1455
|
+
return `NavigationTab.${(_ = s.currentBusiness.value) == null ? void 0 : _._id}`;
|
|
1405
1456
|
}
|
|
1406
|
-
),
|
|
1457
|
+
), J = k(!1), R = F({
|
|
1407
1458
|
get() {
|
|
1408
|
-
return
|
|
1459
|
+
return J.value;
|
|
1409
1460
|
},
|
|
1410
1461
|
set(_) {
|
|
1411
|
-
|
|
1462
|
+
J.value = _, _ || l.setItem(D.value, "true");
|
|
1412
1463
|
}
|
|
1413
1464
|
});
|
|
1414
|
-
return Z([() =>
|
|
1415
|
-
|
|
1416
|
-
|
|
1465
|
+
return Z([() => D.value], () => {
|
|
1466
|
+
J.value = !1, setTimeout(() => {
|
|
1467
|
+
R.value = !l.getItem(D.value);
|
|
1417
1468
|
}, 2e3);
|
|
1418
1469
|
}), (_, w) => {
|
|
1419
|
-
const
|
|
1420
|
-
return i(), c("div",
|
|
1421
|
-
|
|
1470
|
+
const E = z("FmCollapsibleTabs");
|
|
1471
|
+
return i(), c("div", No, [
|
|
1472
|
+
C(E, {
|
|
1422
1473
|
modelValue: Q.value,
|
|
1423
1474
|
"onUpdate:modelValue": w[0] || (w[0] = (K) => Q.value = K),
|
|
1424
|
-
items: $(
|
|
1475
|
+
items: $(U)
|
|
1425
1476
|
}, null, 8, ["modelValue", "items"]),
|
|
1426
|
-
|
|
1477
|
+
C(Do, {
|
|
1427
1478
|
modelValue: r.value,
|
|
1428
1479
|
"onUpdate:modelValue": w[1] || (w[1] = (K) => r.value = K),
|
|
1429
1480
|
capability: u.value,
|
|
1430
1481
|
result: v.value
|
|
1431
1482
|
}, null, 8, ["modelValue", "capability", "result"]),
|
|
1432
|
-
|
|
1483
|
+
C(Io, {
|
|
1433
1484
|
modelValue: p.value,
|
|
1434
1485
|
"onUpdate:modelValue": w[2] || (w[2] = (K) => p.value = K),
|
|
1435
1486
|
"feature-name": P.value,
|
|
@@ -1441,32 +1492,32 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
|
|
|
1441
1492
|
});
|
|
1442
1493
|
typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
|
|
1443
1494
|
let o, e;
|
|
1444
|
-
return { promise: new Promise((
|
|
1445
|
-
o =
|
|
1495
|
+
return { promise: new Promise((s, a) => {
|
|
1496
|
+
o = s, e = a;
|
|
1446
1497
|
}), resolve: o, reject: e };
|
|
1447
1498
|
});
|
|
1448
1499
|
typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
|
|
1449
1500
|
return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
|
|
1450
1501
|
});
|
|
1451
|
-
const
|
|
1502
|
+
const Bo = {
|
|
1452
1503
|
key: 0,
|
|
1453
1504
|
class: "flex h-5 items-center justify-center bg-amber-100 px-12 text-xs font-medium text-amber-800 shadow-sm"
|
|
1454
|
-
},
|
|
1505
|
+
}, Qo = /* @__PURE__ */ re({
|
|
1455
1506
|
__name: "App",
|
|
1456
1507
|
setup(o) {
|
|
1457
|
-
const e = ge(), t = Ot(),
|
|
1508
|
+
const e = ge(), t = Ot(), s = St(), a = window.location.href.includes("print-preview");
|
|
1458
1509
|
Ie(() => {
|
|
1459
1510
|
if (window.location.href.includes("print-preview")) {
|
|
1460
1511
|
e.setEmbedded(!0), document.body.classList.add("print-mode");
|
|
1461
1512
|
return;
|
|
1462
1513
|
}
|
|
1463
|
-
e.registerSidebarComponent(
|
|
1514
|
+
e.registerSidebarComponent(Po), t.initGoogleMap(s.appApi.googleMap).catch(() => {
|
|
1464
1515
|
console.error("Google map cannot be loaded");
|
|
1465
1516
|
});
|
|
1466
1517
|
}), Z([() => e.currentCountry.value], () => {
|
|
1467
|
-
|
|
1518
|
+
l();
|
|
1468
1519
|
});
|
|
1469
|
-
async function
|
|
1520
|
+
async function l() {
|
|
1470
1521
|
var r;
|
|
1471
1522
|
try {
|
|
1472
1523
|
await e.readBusinesses(), e.currentBusiness.value = (r = e.businesses.value) == null ? void 0 : r.find((u) => u);
|
|
@@ -1474,13 +1525,13 @@ const Io = {
|
|
|
1474
1525
|
console.error("error when trying to reset businesses:", u);
|
|
1475
1526
|
}
|
|
1476
1527
|
}
|
|
1477
|
-
return (r, u) => (i(), c(
|
|
1478
|
-
$(
|
|
1479
|
-
|
|
1480
|
-
$(a) ? N("", !0) : (i(),
|
|
1528
|
+
return (r, u) => (i(), c(H, null, [
|
|
1529
|
+
$(s).isDev && !$(a) ? (i(), c("div", Bo, " Non-production environment ")) : N("", !0),
|
|
1530
|
+
C(on),
|
|
1531
|
+
$(a) ? N("", !0) : (i(), ce(xo, { key: 1 }))
|
|
1481
1532
|
], 64));
|
|
1482
1533
|
}
|
|
1483
1534
|
});
|
|
1484
1535
|
export {
|
|
1485
|
-
|
|
1536
|
+
Qo as default
|
|
1486
1537
|
};
|