@open-mercato/core 0.6.7-develop.6648.1.61f5523138 → 0.6.7-develop.6650.1.df84bf47a1

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.
@@ -93,7 +93,7 @@ import {
93
93
  restorePaymentSnapshot
94
94
  } from "./payments.js";
95
95
  import { loadShippedQuantityByLine } from "../lib/shipments/snapshots.js";
96
- import { resolveDictionaryEntryValue } from "../lib/dictionaries.js";
96
+ import { resolveDictionaryEntryValue, resolveCachedDictionaryEntryValue } from "../lib/dictionaries.js";
97
97
  import { resolveStatusEntryIdByValue } from "../lib/statusHelpers.js";
98
98
  import { loadSalesSettings } from "./settings.js";
99
99
  import { notificationTypes } from "../notifications.js";
@@ -3979,10 +3979,11 @@ const createOrderCommand = {
3979
3979
  }
3980
3980
  ensureOrderScope(ctx, parsed.organizationId, parsed.tenantId);
3981
3981
  const em = ctx.container.resolve("em").fork();
3982
+ const dictionaryCache = ctx.container.resolve("cache", { allowUnregistered: true });
3982
3983
  const [status, fulfillmentStatus, paymentStatus] = await Promise.all([
3983
- resolveDictionaryEntryValue(em, parsed.statusEntryId ?? null, { tenantId: parsed.tenantId }),
3984
- resolveDictionaryEntryValue(em, parsed.fulfillmentStatusEntryId ?? null, { tenantId: parsed.tenantId }),
3985
- resolveDictionaryEntryValue(em, parsed.paymentStatusEntryId ?? null, { tenantId: parsed.tenantId })
3984
+ resolveCachedDictionaryEntryValue(em, parsed.statusEntryId ?? null, { tenantId: parsed.tenantId }, dictionaryCache),
3985
+ resolveCachedDictionaryEntryValue(em, parsed.fulfillmentStatusEntryId ?? null, { tenantId: parsed.tenantId }, dictionaryCache),
3986
+ resolveCachedDictionaryEntryValue(em, parsed.paymentStatusEntryId ?? null, { tenantId: parsed.tenantId }, dictionaryCache)
3986
3987
  ]);
3987
3988
  const {
3988
3989
  customerSnapshot: resolvedCustomerSnapshot,